2024-07-04 11:02:45 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
2023-09-05 16:23:40 +05:00
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Migrations
|
|
|
|
|
{
|
2023-09-13 11:42:44 +05:00
|
|
|
|
public partial class Add_New_Permissions : Migration
|
2023-09-05 16:23:40 +05:00
|
|
|
|
{
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
|
table: "t_permission",
|
|
|
|
|
columns: new[] { "id", "description", "name" },
|
|
|
|
|
values: new object[,]
|
|
|
|
|
{
|
|
|
|
|
{ 525, "Разрешение на редактирование РТК у завершенной скважины", "ProcessMap.editCompletedWell" },
|
|
|
|
|
{ 526, "Разрешение на редактирование операций у завершенной скважины", "WellOperation.editCompletedWell" }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.InsertData(
|
|
|
|
|
table: "t_relation_user_role_permission",
|
|
|
|
|
columns: new[] { "id_permission", "id_user_role" },
|
|
|
|
|
values: new object[,]
|
|
|
|
|
{
|
|
|
|
|
{ 525, 1 },
|
2023-09-13 11:42:44 +05:00
|
|
|
|
{ 526, 1 }
|
2023-09-05 16:23:40 +05:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "t_relation_user_role_permission",
|
|
|
|
|
keyColumns: new[] { "id_permission", "id_user_role" },
|
|
|
|
|
keyValues: new object[] { 525, 1 });
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "t_relation_user_role_permission",
|
|
|
|
|
keyColumns: new[] { "id_permission", "id_user_role" },
|
|
|
|
|
keyValues: new object[] { 526, 1 });
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "t_permission",
|
|
|
|
|
keyColumn: "id",
|
|
|
|
|
keyValue: 525);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DeleteData(
|
|
|
|
|
table: "t_permission",
|
|
|
|
|
keyColumn: "id",
|
|
|
|
|
keyValue: 526);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|