53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PyroFetes.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class FixZipCode : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ZipCode",
|
|
table: "Warehouses",
|
|
type: "nvarchar(max)",
|
|
nullable: false,
|
|
oldClrType: typeof(int),
|
|
oldType: "int");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ZipCode",
|
|
table: "Suppliers",
|
|
type: "nvarchar(max)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(5)",
|
|
oldMaxLength: 5);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "ZipCode",
|
|
table: "Warehouses",
|
|
type: "int",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ZipCode",
|
|
table: "Suppliers",
|
|
type: "nvarchar(5)",
|
|
maxLength: 5,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)");
|
|
}
|
|
}
|
|
}
|