forked from ddrilling/AsbCloudServer
Миграции для прав "Критические сообщения
This commit is contained in:
parent
3b2ea6e244
commit
d1f2678bd6
12388
AsbCloudDb/Migrations/20240918050937_Add_Permission_Critical_Message.Designer.cs
generated
Normal file
12388
AsbCloudDb/Migrations/20240918050937_Add_Permission_Critical_Message.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Add_Permission_Critical_Message : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_permission",
|
||||
columns: new[] { "id", "description", "name" },
|
||||
values: new object[] { 533, "Разрешение просматривать критические сообщения", "CriticalMessage.get" });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_relation_user_role_permission",
|
||||
columns: new[] { "id_permission", "id_user_role" },
|
||||
values: new object[] { 533, 1 });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 533, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 533);
|
||||
}
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ namespace AsbCloudDb.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Russian_Russia.1251")
|
||||
.HasAnnotation("ProductVersion", "8.0.8")
|
||||
.HasAnnotation("ProductVersion", "8.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack");
|
||||
@ -2632,6 +2632,12 @@ namespace AsbCloudDb.Migrations
|
||||
Id = 532,
|
||||
Description = "Разрешение просматривать информацию о телеметрии",
|
||||
Name = "Version.get"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 533,
|
||||
Description = "Разрешение просматривать критические сообщения",
|
||||
Name = "CriticalMessage.get"
|
||||
});
|
||||
});
|
||||
|
||||
@ -6377,6 +6383,11 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 532
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 533
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -165,7 +165,8 @@ namespace AsbCloudDb.Model.DefaultData
|
||||
new() { Id = 530, Name = "WellSectionPlan.edit", Description = "Разрешение на редактирование плановой конструкции скважины"},
|
||||
new() { Id = 531, Name = "WellSectionPlan.delete", Description = "Разрешение на удаление плановой конструкции скважины"},
|
||||
|
||||
new() { Id = 532, Name = "Version.get", Description = "Разрешение просматривать информацию о телеметрии"}
|
||||
new() { Id = 532, Name = "Version.get", Description = "Разрешение просматривать информацию о телеметрии"},
|
||||
new() { Id = 533, Name = "CriticalMessage.get", Description = "Разрешение просматривать критические сообщения"}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user