Files
TenWholeYears.Server/RecNet.Infrastructure/Persistence/Migrations/20260618180145_Initial.cs
2026-06-18 13:15:27 -05:00

45 lines
1.6 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RecNet.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class Initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Profiles",
columns: table => new
{
ProfileId = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
Platform = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
PlatformId = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
DeviceIds = table.Column<string>(type: "jsonb", nullable: false),
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Profiles", x => x.ProfileId);
});
migrationBuilder.CreateIndex(
name: "IX_Profiles_Platform_PlatformId",
table: "Profiles",
columns: new[] { "Platform", "PlatformId" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Profiles");
}
}
}