using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CompanyManagment.EFCore.Migrations { /// public partial class addemployeeAuthorizeTempandaddserialNumber : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IdNumberSeri", table: "Employees", type: "nvarchar(25)", maxLength: 25, nullable: true); migrationBuilder.AddColumn( name: "IdNumberSerial", table: "Employees", type: "nvarchar(25)", maxLength: 25, nullable: true); migrationBuilder.CreateTable( name: "EmployeeAuthorizeTemps", columns: table => new { id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Gender = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false), FName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), LName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), FatherName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), BirthDate = table.Column(type: "datetime2", nullable: false), NationalCode = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), IdNumber = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), IdNumberSerial = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: true), IdNumberSeri = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: true), CreationDate = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_EmployeeAuthorizeTemps", x => x.id); }); migrationBuilder.CreateIndex( name: "IX_EmployeeAuthorizeTemps_NationalCode", table: "EmployeeAuthorizeTemps", column: "NationalCode", unique: true, filter: "[NationalCode] IS NOT NULL"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "EmployeeAuthorizeTemps"); migrationBuilder.DropColumn( name: "IdNumberSeri", table: "Employees"); migrationBuilder.DropColumn( name: "IdNumberSerial", table: "Employees"); } } }