123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
- namespace MTWorkHR.Infrastructure.Migrations
- {
- /// <inheritdoc />
- public partial class permissionConfig : Migration
- {
- /// <inheritdoc />
- 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 }
- });
- }
- /// <inheritdoc />
- 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" });
- }
- }
- }
|