using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CompanyManagment.EFCore.Migrations { /// public partial class addemployeebyclienttables : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IsAuthorized", table: "Employees", type: "bit", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "EmployeeClientTemps", columns: table => new { id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeFullName = table.Column(type: "nvarchar(max)", nullable: true), WorkshopId = table.Column(type: "bigint", nullable: false), EmployeeId = table.Column(type: "bigint", nullable: false), StartWorkDate = table.Column(type: "datetime2", nullable: false), MaritalStatus = table.Column(type: "nvarchar(max)", nullable: true), CreationDate = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_EmployeeClientTemps", x => x.id); }); migrationBuilder.CreateTable( name: "LeftWorkTemps", columns: table => new { id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), LeftWorkId = table.Column(type: "bigint", nullable: false), StartWork = table.Column(type: "datetime2", nullable: false), LeftWork = table.Column(type: "datetime2", nullable: false), LastDayStanding = table.Column(type: "datetime2", nullable: false), WorkshopId = table.Column(type: "bigint", nullable: false), EmployeeId = table.Column(type: "bigint", nullable: false), JobId = table.Column(type: "bigint", nullable: false), LeftWorkType = table.Column(type: "int", nullable: false), CreationDate = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_LeftWorkTemps", x => x.id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "EmployeeClientTemps"); migrationBuilder.DropTable( name: "LeftWorkTemps"); migrationBuilder.DropColumn( name: "IsAuthorized", table: "Employees"); } } }