using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace AsbCloudDb.Migrations { public partial class AddPermission : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.InsertData( table: "t_permission", columns: new[] { "id", "description", "name" }, values: new object[,] { { 500, "Разрешение удалять Категорий документов файлов", "FileCategory.delete" }, { 501, "Разрешение редактировать Категорий документов файлов", "FileCategory.edit" }, { 502, "Разрешение просматривать Категорий документов файлов", "FileCategory.get" }, { 503, "Разрешение удалять Дело скважины", "WellFinalDocument.delete" }, { 504, "Разрешение редактировать Дело скважины", "WellFinalDocument.edit" }, { 505, "Разрешение просматривать Дело скважины", "WellFinalDocument.get" } }); migrationBuilder.InsertData( table: "t_relation_user_role_permission", columns: new[] { "id_permission", "id_user_role" }, values: new object[,] { { 500, 1 }, { 501, 1 }, { 502, 1 }, { 503, 1 }, { 504, 1 }, { 505, 1 } }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DeleteData( table: "t_relation_user_role_permission", keyColumns: new[] { "id_permission", "id_user_role" }, keyValues: new object[] { 500, 1 }); migrationBuilder.DeleteData( table: "t_relation_user_role_permission", keyColumns: new[] { "id_permission", "id_user_role" }, keyValues: new object[] { 501, 1 }); migrationBuilder.DeleteData( table: "t_relation_user_role_permission", keyColumns: new[] { "id_permission", "id_user_role" }, keyValues: new object[] { 502, 1 }); migrationBuilder.DeleteData( table: "t_relation_user_role_permission", keyColumns: new[] { "id_permission", "id_user_role" }, keyValues: new object[] { 503, 1 }); migrationBuilder.DeleteData( table: "t_relation_user_role_permission", keyColumns: new[] { "id_permission", "id_user_role" }, keyValues: new object[] { 504, 1 }); migrationBuilder.DeleteData( table: "t_relation_user_role_permission", keyColumns: new[] { "id_permission", "id_user_role" }, keyValues: new object[] { 505, 1 }); migrationBuilder.DeleteData( table: "t_permission", keyColumn: "id", keyValue: 500); migrationBuilder.DeleteData( table: "t_permission", keyColumn: "id", keyValue: 501); migrationBuilder.DeleteData( table: "t_permission", keyColumn: "id", keyValue: 502); migrationBuilder.DeleteData( table: "t_permission", keyColumn: "id", keyValue: 503); migrationBuilder.DeleteData( table: "t_permission", keyColumn: "id", keyValue: 504); migrationBuilder.DeleteData( table: "t_permission", keyColumn: "id", keyValue: 505); } } }