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