using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace MTWorkHR.Infrastructure.Migrations
{
///
public partial class permissionConfig : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "AttachmentTypes",
keyColumn: "Id",
keyValue: 2L,
columns: new[] { "NameAr", "NameEn" },
values: new object[] { "جواز السفر", "Passport" });
migrationBuilder.InsertData(
table: "AttachmentTypes",
columns: new[] { "Id", "IsRequired", "NameAr", "NameEn" },
values: new object[,]
{
{ 6L, false, "شهادة الاحتراف", "Commercial Regestration" },
{ 7L, false, "البطاقة الضريبية", "Tax Declaration" },
{ 8L, false, "الهوية", "Identification" }
});
migrationBuilder.InsertData(
table: "Permissions",
columns: new[] { "Id", "CategoryName", "Desc", "Name", "Show" },
values: new object[,]
{
{ 1L, "User", "Project", "Project", true },
{ 2L, "User", "Project.Create", "Project.Create", false },
{ 3L, "User", "Project.Update", "Project.Update", false },
{ 4L, "User", "Project.Delete", "Project.Delete", false },
{ 5L, "User", "Meeting", "Meeting", true },
{ 6L, "User", "Meeting.Create", "Meeting.Create", false },
{ 7L, "User", "Meeting.Update", "Meeting.Update", false },
{ 8L, "User", "Meeting.Delete", "Meeting.Delete", false },
{ 9L, "User", "Team", "Team", true },
{ 10L, "User", "Team.Create", "Team.Create", false },
{ 11L, "User", "Team.Update", "Team.Update", false },
{ 12L, "User", "Team.Delete", "Team.Delete", false },
{ 13L, "Sales", "UserTask", "UserTask", true },
{ 14L, "Sales", "UserTask.Create", "UserTask.Create", false },
{ 15L, "Sales", "UserTask.Update", "UserTask.Update", false },
{ 16L, "User", "UserTask.Delete", "UserTask.Delete", false },
{ 17L, "User", "Company", "Company", true },
{ 18L, "User", "Company.Create", "Company.Create", false },
{ 19L, "User", "Company.Update", "Company.Update", false },
{ 20L, "User", "Company.Delete", "Company.Delete", false },
{ 21L, "Adminstration", "User", "User", true },
{ 22L, "Adminstration", "User.Create", "User.Create", false },
{ 23L, "Adminstration", "User.Update", "User.Update", false },
{ 24L, "Adminstration", "User.Delete", "User.Delete", false },
{ 25L, "Adminstration", "Role", "Role", true },
{ 26L, "Adminstration", "Role.Create", "Role.Create", false },
{ 27L, "Adminstration", "Role.Update", "Role.Update", false },
{ 28L, "Adminstration", "Role.Delete", "Role.Delete", false }
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "AttachmentTypes",
keyColumn: "Id",
keyValue: 6L);
migrationBuilder.DeleteData(
table: "AttachmentTypes",
keyColumn: "Id",
keyValue: 7L);
migrationBuilder.DeleteData(
table: "AttachmentTypes",
keyColumn: "Id",
keyValue: 8L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 1L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 2L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 3L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 4L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 5L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 6L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 7L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 8L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 9L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 10L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 11L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 12L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 13L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 14L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 15L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 16L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 17L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 18L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 19L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 20L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 21L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 22L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 23L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 24L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 25L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 26L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 27L);
migrationBuilder.DeleteData(
table: "Permissions",
keyColumn: "Id",
keyValue: 28L);
migrationBuilder.UpdateData(
table: "AttachmentTypes",
keyColumn: "Id",
keyValue: 2L,
columns: new[] { "NameAr", "NameEn" },
values: new object[] { "الهوية", "Identification" });
}
}
}