2023-08-18 16:14:41 -05:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace DamageAssesment.Api.Locations.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
2023-09-27 16:18:48 -05:00
|
|
|
|
public partial class AzureLocations : Migration
|
2023-08-18 16:14:41 -05:00
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "Locations",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
2023-09-27 16:18:48 -05:00
|
|
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
|
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
|
|
|
RegionId = table.Column<int>(type: "int", nullable: false),
|
|
|
|
|
LocationCode = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
|
2023-08-18 16:14:41 -05:00
|
|
|
|
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
2023-09-27 16:18:48 -05:00
|
|
|
|
MaintenanceCenter = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
|
|
|
|
|
SchoolType = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: false)
|
2023-08-18 16:14:41 -05:00
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_Locations", x => x.Id);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "Regions",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
2023-09-27 16:18:48 -05:00
|
|
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
|
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
2023-08-18 16:14:41 -05:00
|
|
|
|
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
|
|
|
|
Abbreviation = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_Regions", x => x.Id);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Locations");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Regions");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|