forked from ddrilling/AsbCloudServer
Миграция для раздачи прав на просмотр / редактирвоание контактной информации по скважине
This commit is contained in:
parent
464dd57eef
commit
7304086e7f
8158
AsbCloudDb/Migrations/20230626064513_Add_Permissions_RelationContactWell.Designer.cs
generated
Normal file
8158
AsbCloudDb/Migrations/20230626064513_Add_Permissions_RelationContactWell.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Add_Permissions_RelationContactWell : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_permission",
|
||||
columns: new[] { "id", "description", "name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 519, "Разрешение просматривать список контактов", "RelationContactWell.get" },
|
||||
{ 520, "Разрешение редактировать список контактов", "RelationContactWell.edit" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_relation_user_role_permission",
|
||||
columns: new[] { "id_permission", "id_user_role" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 519, 1 },
|
||||
{ 520, 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[] { 519, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 520, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 519);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 520);
|
||||
}
|
||||
}
|
||||
}
|
@ -2002,6 +2002,18 @@ namespace AsbCloudDb.Migrations
|
||||
Id = 518,
|
||||
Description = "Разрешение удалять вопрос",
|
||||
Name = "FaqStatistics.delete"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 519,
|
||||
Description = "Разрешение просматривать список контактов",
|
||||
Name = "RelationContactWell.get"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 520,
|
||||
Description = "Разрешение редактировать список контактов",
|
||||
Name = "RelationContactWell.edit"
|
||||
});
|
||||
});
|
||||
|
||||
@ -3569,6 +3581,16 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 518
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 519
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 520
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -149,6 +149,9 @@
|
||||
new (){ Id = 516, Name="FaqStatistics.get", Description="Разрешение просматривать статистику вопросов"},
|
||||
new (){ Id = 517, Name="FaqStatistics.edit", Description="Разрешение редактировать вопрос"},
|
||||
new (){ Id = 518, Name="FaqStatistics.delete", Description="Разрешение удалять вопрос"},
|
||||
|
||||
new (){ Id = 519, Name="RelationContactWell.get", Description="Разрешение просматривать список контактов"},
|
||||
new (){ Id = 520, Name="RelationContactWell.edit", Description="Разрешение редактировать список контактов"},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user