Files
ChronoCCG/Chrono/API/Migrations/20260817043106_InitialCreate.cs
6d486f49 1d6207fbfe API Test
2026-08-17 00:45:08 -04:00

73 lines
2.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CardNotes",
columns: table => new
{
Username = table.Column<string>(type: "text", nullable: false),
CardName = table.Column<string>(type: "text", nullable: false),
Note = table.Column<string>(type: "text", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CardNotes", x => new { x.Username, x.CardName });
});
migrationBuilder.CreateTable(
name: "UserDecks",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "text", nullable: false),
Cards = table.Column<string>(type: "jsonb", nullable: false),
Divers = table.Column<string>(type: "jsonb", nullable: false),
Notes = table.Column<string>(type: "text", nullable: true),
Season = table.Column<string>(type: "text", nullable: true),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserDecks", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Username = table.Column<string>(type: "text", nullable: false),
Password = table.Column<string>(type: "text", nullable: false),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Username);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CardNotes");
migrationBuilder.DropTable(
name: "UserDecks");
migrationBuilder.DropTable(
name: "Users");
}
}
}