using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CompanyManagment.EFCore.Migrations { /// public partial class addoffDaystocws : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DayOfWeek = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false), ParentId = table.Column(type: "bigint", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CustomizeWorkshopEmployeeSettings_WeeklyOffDays", x => x.Id); table.ForeignKey( name: "FK_CustomizeWorkshopEmployeeSettings_WeeklyOffDays_CustomizeWorkshopEmployeeSettings_ParentId", column: x => x.ParentId, principalTable: "CustomizeWorkshopEmployeeSettings", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "CustomizeWorkshopGroupSettings_WeeklyOffDays", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DayOfWeek = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false), ParentId = table.Column(type: "bigint", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CustomizeWorkshopGroupSettings_WeeklyOffDays", x => x.Id); table.ForeignKey( name: "FK_CustomizeWorkshopGroupSettings_WeeklyOffDays_CustomizeWorkshopGroupSettings_ParentId", column: x => x.ParentId, principalTable: "CustomizeWorkshopGroupSettings", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "CustomizeWorkshopSettings_WeeklyOffDays", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DayOfWeek = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false), ParentId = table.Column(type: "bigint", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CustomizeWorkshopSettings_WeeklyOffDays", x => x.Id); table.ForeignKey( name: "FK_CustomizeWorkshopSettings_WeeklyOffDays_CustomizeWorkshopSettings_ParentId", column: x => x.ParentId, principalTable: "CustomizeWorkshopSettings", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_CustomizeWorkshopEmployeeSettings_WeeklyOffDays_ParentId", table: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays", column: "ParentId"); migrationBuilder.CreateIndex( name: "IX_CustomizeWorkshopGroupSettings_WeeklyOffDays_ParentId", table: "CustomizeWorkshopGroupSettings_WeeklyOffDays", column: "ParentId"); migrationBuilder.CreateIndex( name: "IX_CustomizeWorkshopSettings_WeeklyOffDays_ParentId", table: "CustomizeWorkshopSettings_WeeklyOffDays", column: "ParentId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays"); migrationBuilder.DropTable( name: "CustomizeWorkshopGroupSettings_WeeklyOffDays"); migrationBuilder.DropTable( name: "CustomizeWorkshopSettings_WeeklyOffDays"); } } }