using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; using NodaTime; #nullable disable namespace DysonNetwork.Pass.Migrations { /// public partial class AddRewindPoint : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "rewind_points", columns: table => new { id = table.Column(type: "uuid", nullable: false), year = table.Column(type: "integer", nullable: false), schema_version = table.Column(type: "integer", nullable: false), data = table.Column>(type: "jsonb", nullable: false), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), deleted_at = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("pk_rewind_points", x => x.id); table.ForeignKey( name: "fk_rewind_points_accounts_account_id", column: x => x.account_id, principalTable: "accounts", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "ix_rewind_points_account_id", table: "rewind_points", column: "account_id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "rewind_points"); } } }