DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20220203045356_AddRoleRelatedMatrixDefaults.cs

741 lines
31 KiB
C#
Raw Normal View History

2022-02-03 09:58:42 +05:00
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class AddRoleRelatedMatrixDefaults : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "t_permission",
columns: new[] { "id", "description", "name" },
values: new object[,]
{
{ 240, "Разрешение редактировать Файлы категории 1 (Растворный сервис)", "File.edit1" },
{ 241, "Разрешение редактировать Файлы категории 2 (Цементирование)", "File.edit2" },
{ 242, "Разрешение редактировать Файлы категории 3 (ННБ)", "File.edit3" },
{ 243, "Разрешение редактировать Файлы категории 4 (ГТИ)", "File.edit4" },
{ 244, "Разрешение редактировать Файлы категории 5 (Документы по скважине)", "File.edit5" },
{ 245, "Разрешение редактировать Файлы категории 6 (Супервайзер)", "File.edit6" },
{ 246, "Разрешение редактировать Файлы категории 7 (Мастер)", "File.edit7" },
{ 247, "Разрешение редактировать Файлы категории 8 (Долотный сервис)", "File.edit8" },
{ 248, "Разрешение редактировать Файлы категории 9 (Буровой подрядчик)", "File.edit9" },
{ 249, "Разрешение редактировать Файлы категории 10 (Сервис по заканчиванию скважины)", "File.edit10" },
{ 250, "Разрешение редактировать Файлы категории 11 (Рапорт)", "File.edit11" },
{ 251, "Разрешение редактировать Файлы категории 12", "File.edit12" },
{ 252, "Разрешение редактировать Файлы категории 12", "File.edit13" },
{ 253, "Разрешение редактировать Файлы категории 13", "File.edit14" },
{ 254, "Разрешение редактировать Файлы категории 14", "File.edit15" },
{ 255, "Разрешение редактировать Файлы категории 15", "File.edit16" },
{ 256, "Разрешение редактировать Файлы категории 16", "File.edit17" },
{ 257, "Разрешение редактировать Файлы категории 17", "File.edit18" },
{ 258, "Разрешение редактировать Файлы категории 18", "File.edit19" },
{ 259, "Разрешение редактировать Файлы категории 19", "File.edit20" },
{ 260, "Разрешение редактировать Файлы категории 20", "File.edit21" },
{ 261, "Разрешение редактировать Файлы категории 21", "File.edit22" },
{ 262, "Разрешение редактировать Файлы категории 22", "File.edit23" },
{ 263, "Разрешение редактировать Файлы категории 23", "File.edit24" },
{ 264, "Разрешение редактировать Файлы категории 24", "File.edit25" },
{ 265, "Разрешение редактировать Файлы категории 25", "File.edit26" },
{ 266, "Разрешение редактировать Файлы категории 26", "File.edit27" },
{ 267, "Разрешение редактировать Файлы категории 27", "File.edit28" },
{ 268, "Разрешение редактировать Файлы категории 28", "File.edit29" },
{ 269, "Разрешение редактировать Файлы категории 29", "File.edit30" }
});
migrationBuilder.InsertData(
table: "t_relation_user_role_permission",
columns: new[] { "id_permission", "id_user_role" },
values: new object[,]
{
{ 126, 1116 },
{ 212, 1202 },
{ 219, 1210 },
{ 232, 1219 },
{ 234, 1221 }
});
migrationBuilder.InsertData(
table: "t_user_role",
columns: new[] { "id", "caption", "id_type" },
values: new object[,]
{
{ 1500, "Просмотр всего", 1 },
{ 1501, "file.edit", 1 },
{ 1502, "drillingProgram.edit", 1 },
{ 2000, "Заказчик", 0 },
{ 2001, "Супервайзер", 0 },
{ 2002, "Буровой подрядчик", 0 },
{ 2003, "Растворщик", 0 },
{ 2004, "Телеметрист", 0 },
{ 2005, "Долотный сервис", 0 },
{ 2006, "ГТИ", 0 },
{ 2007, "Цементирование", 0 }
});
migrationBuilder.InsertData(
table: "t_relation_user_role_permission",
columns: new[] { "id_permission", "id_user_role" },
values: new object[,]
{
{ 213, 1501 },
{ 214, 1501 },
{ 207, 1502 },
{ 208, 1502 },
{ 204, 2000 },
{ 205, 2000 },
{ 245, 2000 },
{ 244, 2001 },
{ 245, 2001 },
{ 237, 2002 },
{ 238, 2002 },
{ 244, 2002 },
{ 246, 2002 },
{ 216, 2003 },
{ 217, 2003 },
{ 240, 2003 },
{ 204, 2004 },
{ 205, 2004 },
{ 216, 2004 },
{ 217, 2004 },
{ 242, 2004 },
{ 204, 2005 },
{ 205, 2005 },
{ 247, 2005 },
{ 204, 2006 },
{ 205, 2006 },
{ 243, 2006 },
{ 204, 2007 },
{ 205, 2007 },
{ 241, 2007 }
});
migrationBuilder.InsertData(
table: "t_relation_user_role_user_role",
columns: new[] { "id_user_role", "id_include_user_role" },
values: new object[,]
{
{ 2000, 1200 },
{ 2000, 1201 },
{ 2000, 1202 },
{ 2000, 1204 },
{ 2000, 1205 },
{ 2000, 1206 },
{ 2000, 1208 },
{ 2000, 1210 },
{ 2000, 1211 },
{ 2000, 1213 },
{ 2000, 1215 },
{ 2000, 1217 },
{ 2000, 1219 },
{ 2000, 1220 },
{ 2000, 1221 },
{ 2000, 1500 },
{ 2000, 1501 },
{ 2000, 1502 },
{ 2001, 1500 },
{ 2001, 1501 },
{ 2001, 1502 },
{ 2002, 1500 },
{ 2002, 1501 },
{ 2002, 1502 },
{ 2003, 1500 },
{ 2003, 1501 },
{ 2003, 1502 },
{ 2004, 1500 },
{ 2004, 1501 },
{ 2004, 1502 },
{ 2005, 1500 },
{ 2005, 1501 },
{ 2005, 1502 },
{ 2006, 1500 },
{ 2006, 1501 },
{ 2006, 1502 },
{ 2007, 1500 },
{ 2007, 1501 },
{ 2007, 1502 }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 248);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 249);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 250);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 251);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 252);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 253);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 254);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 255);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 256);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 257);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 258);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 259);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 260);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 261);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 262);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 263);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 264);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 265);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 266);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 267);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 268);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 269);
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 126, 1116 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 212, 1202 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 219, 1210 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 232, 1219 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 234, 1221 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 213, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 214, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 207, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 208, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 204, 2000 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 205, 2000 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 245, 2000 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 244, 2001 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 245, 2001 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 237, 2002 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 238, 2002 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 244, 2002 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 246, 2002 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 216, 2003 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 217, 2003 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 240, 2003 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 204, 2004 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 205, 2004 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 216, 2004 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 217, 2004 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 242, 2004 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 204, 2005 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 205, 2005 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 247, 2005 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 204, 2006 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 205, 2006 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 243, 2006 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 204, 2007 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 205, 2007 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 241, 2007 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1200 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1201 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1202 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1204 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1205 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1206 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1208 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1210 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1211 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1213 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1215 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1217 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1219 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1220 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1221 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2000, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2001, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2001, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2001, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2002, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2002, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2002, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2003, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2003, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2003, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2004, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2004, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2004, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2005, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2005, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2005, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2006, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2006, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2006, 1502 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2007, 1500 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2007, 1501 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_user_role",
keyColumns: new[] { "id_user_role", "id_include_user_role" },
keyValues: new object[] { 2007, 1502 });
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 240);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 241);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 242);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 243);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 244);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 245);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 246);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 247);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1500);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1501);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 1502);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2000);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2001);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2002);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2003);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2004);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2005);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2006);
migrationBuilder.DeleteData(
table: "t_user_role",
keyColumn: "id",
keyValue: 2007);
}
}
}