DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.cs

66 lines
2.3 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class Add_Permission_For_FaqStatistics : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "t_permission",
columns: new[] { "id", "description", "name" },
values: new object[,]
{
{ 516, "Разрешение просматривать статистику вопросов", "FaqStatistics.get" },
{ 517, "Разрешение редактировать вопрос", "FaqStatistics.edit" },
{ 518, "Разрешение удалять вопрос", "FaqStatistics.delete" }
});
migrationBuilder.InsertData(
table: "t_relation_user_role_permission",
columns: new[] { "id_permission", "id_user_role" },
values: new object[,]
{
{ 516, 1 },
{ 517, 1 },
{ 518, 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[] { 516, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 517, 1 });
migrationBuilder.DeleteData(
table: "t_relation_user_role_permission",
keyColumns: new[] { "id_permission", "id_user_role" },
keyValues: new object[] { 518, 1 });
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 516);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 517);
migrationBuilder.DeleteData(
table: "t_permission",
keyColumn: "id",
keyValue: 518);
}
}
}