Files
parr_api/PARR.DAL/Migrations/20251208235159_tblTnkAddShortName.cs

57 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class tblTnkAddShortName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Tnks_EsppId",
table: "Tnks");
migrationBuilder.AlterColumn<int>(
name: "EsppId",
table: "Tnks",
type: "integer",
nullable: true,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AddColumn<string>(
name: "ShortName",
table: "Tnks",
type: "text",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ShortName",
table: "Tnks");
migrationBuilder.AlterColumn<int>(
name: "EsppId",
table: "Tnks",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer",
oldNullable: true);
migrationBuilder.CreateIndex(
name: "IX_Tnks_EsppId",
table: "Tnks",
column: "EsppId",
unique: true);
}
}
}