using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Backend.Migrations { /// public partial class AddSeasonShowStartsAt : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql( """ ALTER TABLE "Seasons" ADD COLUMN IF NOT EXISTS "ShowStartsAt" time without time zone NOT NULL DEFAULT TIME '20:00:00'; """); migrationBuilder.UpdateData( table: "Seasons", keyColumn: "Id", keyValue: 1, column: "ShowStartsAt", value: new TimeOnly(20, 0, 0)); migrationBuilder.UpdateData( table: "Seasons", keyColumn: "Id", keyValue: 2, column: "ShowStartsAt", value: new TimeOnly(20, 0, 0)); migrationBuilder.UpdateData( table: "Seasons", keyColumn: "Id", keyValue: 3, column: "ShowStartsAt", value: new TimeOnly(20, 0, 0)); migrationBuilder.UpdateData( table: "Seasons", keyColumn: "Id", keyValue: 4, column: "ShowStartsAt", value: new TimeOnly(20, 0, 0)); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "ShowStartsAt", table: "Seasons"); } } }