42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DamageAssesment.Api.Employees.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AzureEmployees : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Employees",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
EmployeeCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
|
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
|
BirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
OfficePhoneNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
|
Email = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
|
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
|
PreferredLanguage = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Employees", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Employees");
|
|
}
|
|
}
|
|
}
|