From e550ac9d13a34595804018bb98f2d16f07c7d379 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Tue, 5 Dec 2023 11:35:11 +0500 Subject: [PATCH] fix migration DetectedOperation_add_subsystems_and_extraData --- ..._add_subsystems_and_extraData.Designer.cs} | 2 +- ...Operation_add_subsystems_and_extraData.cs} | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) rename AsbCloudDb/Migrations/{20231205061148_DetectedOperation_add_subsystems_and_extraData.Designer.cs => 20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs} (99%) rename AsbCloudDb/Migrations/{20231205061148_DetectedOperation_add_subsystems_and_extraData.cs => 20231205063450_DetectedOperation_add_subsystems_and_extraData.cs} (65%) diff --git a/AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.Designer.cs b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs similarity index 99% rename from AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.Designer.cs rename to AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs index e3461b2f..188c3aaf 100644 --- a/AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.Designer.cs +++ b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs @@ -14,7 +14,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace AsbCloudDb.Migrations { [DbContext(typeof(AsbCloudDbContext))] - [Migration("20231205061148_DetectedOperation_add_subsystems_and_extraData")] + [Migration("20231205063450_DetectedOperation_add_subsystems_and_extraData")] partial class DetectedOperation_add_subsystems_and_extraData { protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.cs b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs similarity index 65% rename from AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.cs rename to AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs index 72cfe669..c295f1cd 100644 --- a/AsbCloudDb/Migrations/20231205061148_DetectedOperation_add_subsystems_and_extraData.cs +++ b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs @@ -9,6 +9,16 @@ namespace AsbCloudDb.Migrations { protected override void Up(MigrationBuilder migrationBuilder) { + migrationBuilder.DeleteData( + table: "t_relation_user_role_permission", + keyColumns: new[] { "id_permission", "id_user_role" }, + keyValues: new object[] { 529, 1 }); + + migrationBuilder.DeleteData( + table: "t_permission", + keyColumn: "id", + keyValue: 529); + migrationBuilder.DropColumn( name: "id_reason_of_end", table: "t_detected_operation"); @@ -46,6 +56,16 @@ namespace AsbCloudDb.Migrations nullable: false, defaultValue: 0, comment: "Код признака окончания операции"); + + migrationBuilder.InsertData( + table: "t_permission", + columns: new[] { "id", "description", "name" }, + values: new object[] { 529, "Разрешение редактировать фактические траектории", "FactTrajectory.edit" }); + + migrationBuilder.InsertData( + table: "t_relation_user_role_permission", + columns: new[] { "id_permission", "id_user_role" }, + values: new object[] { 529, 1 }); } } }