Files
PhotoShare/PhotoShareDb/Migrations/20260315131731_AddDesireTable.cs
T
2026-05-16 21:29:22 +02:00

36 lines
1.1 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace PhotoShareDb.Migrations
{
/// <inheritdoc />
public partial class AddDesireTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "T_DesireData",
columns: table => new
{
Key = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Desire = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DesireData", x => x.Key);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "T_DesireData");
}
}
}