using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
///
public partial class addheaderproperiesincustomizecheckout : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "IrregularShift_EndTime",
table: "CustomizeCheckoutTemps",
type: "time",
nullable: true);
migrationBuilder.AddColumn(
name: "IrregularShift_StartTime",
table: "CustomizeCheckoutTemps",
type: "time",
nullable: true);
migrationBuilder.AddColumn(
name: "IrregularShift_WorkshopIrregularShifts",
table: "CustomizeCheckoutTemps",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn(
name: "IrregularShift_EndTime",
table: "CustomizeCheckouts",
type: "time",
nullable: true);
migrationBuilder.AddColumn(
name: "IrregularShift_StartTime",
table: "CustomizeCheckouts",
type: "time",
nullable: true);
migrationBuilder.AddColumn(
name: "IrregularShift_WorkshopIrregularShifts",
table: "CustomizeCheckouts",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.CreateTable(
name: "CustomizeCheckouts_CustomizeRotatingShifts",
columns: table => new
{
CustomizeCheckoutid = table.Column(type: "bigint", nullable: false),
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
StartTime = table.Column(type: "time", nullable: false),
EndTime = table.Column(type: "time", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckouts_CustomizeRotatingShifts", x => new { x.CustomizeCheckoutid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckouts_CustomizeRotatingShifts_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckouts_RegularShifts",
columns: table => new
{
id = table.Column(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CustomizeCheckoutid = table.Column(type: "bigint", nullable: false),
CreationDate = table.Column(type: "datetime2", nullable: false),
StartTime = table.Column(type: "time", nullable: false),
EndTime = table.Column(type: "time", nullable: false),
Placement = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckouts_RegularShifts", x => x.id);
table.ForeignKey(
name: "FK_CustomizeCheckouts_RegularShifts_CustomizeCheckouts_CustomizeCheckoutid",
column: x => x.CustomizeCheckoutid,
principalTable: "CustomizeCheckouts",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTemps_CustomizeRotatingShifts",
columns: table => new
{
CustomizeCheckoutTempid = table.Column(type: "bigint", nullable: false),
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
StartTime = table.Column(type: "time", nullable: false),
EndTime = table.Column(type: "time", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTemps_CustomizeRotatingShifts", x => new { x.CustomizeCheckoutTempid, x.Id });
table.ForeignKey(
name: "FK_CustomizeCheckoutTemps_CustomizeRotatingShifts_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomizeCheckoutTemps_RegularShifts",
columns: table => new
{
id = table.Column(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CustomizeCheckoutTempid = table.Column(type: "bigint", nullable: false),
CreationDate = table.Column(type: "datetime2", nullable: false),
StartTime = table.Column(type: "time", nullable: false),
EndTime = table.Column(type: "time", nullable: false),
Placement = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomizeCheckoutTemps_RegularShifts", x => x.id);
table.ForeignKey(
name: "FK_CustomizeCheckoutTemps_RegularShifts_CustomizeCheckoutTemps_CustomizeCheckoutTempid",
column: x => x.CustomizeCheckoutTempid,
principalTable: "CustomizeCheckoutTemps",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CustomizeCheckouts_RegularShifts_CustomizeCheckoutid",
table: "CustomizeCheckouts_RegularShifts",
column: "CustomizeCheckoutid");
migrationBuilder.CreateIndex(
name: "IX_CustomizeCheckoutTemps_RegularShifts_CustomizeCheckoutTempid",
table: "CustomizeCheckoutTemps_RegularShifts",
column: "CustomizeCheckoutTempid");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CustomizeCheckouts_CustomizeRotatingShifts");
migrationBuilder.DropTable(
name: "CustomizeCheckouts_RegularShifts");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTemps_CustomizeRotatingShifts");
migrationBuilder.DropTable(
name: "CustomizeCheckoutTemps_RegularShifts");
migrationBuilder.DropColumn(
name: "IrregularShift_EndTime",
table: "CustomizeCheckoutTemps");
migrationBuilder.DropColumn(
name: "IrregularShift_StartTime",
table: "CustomizeCheckoutTemps");
migrationBuilder.DropColumn(
name: "IrregularShift_WorkshopIrregularShifts",
table: "CustomizeCheckoutTemps");
migrationBuilder.DropColumn(
name: "IrregularShift_EndTime",
table: "CustomizeCheckouts");
migrationBuilder.DropColumn(
name: "IrregularShift_StartTime",
table: "CustomizeCheckouts");
migrationBuilder.DropColumn(
name: "IrregularShift_WorkshopIrregularShifts",
table: "CustomizeCheckouts");
}
}
}