fix migration DetectedOperation_add_subsystems_and_extraData

This commit is contained in:
ngfrolov 2023-12-05 11:35:11 +05:00
parent 4631772bc3
commit e550ac9d13
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
2 changed files with 21 additions and 1 deletions

View File

@ -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)

View File

@ -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 });
}
}
}