49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DamageAssesment.Api.Employees.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class employeeupdate : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "Id",
|
|
table: "Employees",
|
|
type: "int",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(450)")
|
|
.Annotation("SqlServer:Identity", "1, 1");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "EmployeeCode",
|
|
table: "Employees",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "EmployeeCode",
|
|
table: "Employees");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Id",
|
|
table: "Employees",
|
|
type: "nvarchar(450)",
|
|
nullable: false,
|
|
oldClrType: typeof(int),
|
|
oldType: "int")
|
|
.OldAnnotation("SqlServer:Identity", "1, 1");
|
|
}
|
|
}
|
|
}
|