using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SameBeat.Infrastructure.BazaDanych.Migracje { /// public partial class DodanoSceneISloty : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "UkladSceny", table: "Wydarzenia", type: "character varying(16)", maxLength: 16, nullable: false, defaultValue: "Grid4"); migrationBuilder.AddColumn( name: "SekretSesjiHash", table: "UczestnicyOczekujacy", type: "character varying(1024)", maxLength: 1024, nullable: true); migrationBuilder.CreateTable( name: "SlotySceny", columns: table => new { Id = table.Column(type: "uuid", nullable: false), WydarzenieId = table.Column(type: "uuid", nullable: false), NumerSlotu = table.Column(type: "integer", nullable: false), UczestnikOczekujacyId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_SlotySceny", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_SlotySceny_WydarzenieId_NumerSlotu", table: "SlotySceny", columns: new[] { "WydarzenieId", "NumerSlotu" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "SlotySceny"); migrationBuilder.DropColumn( name: "UkladSceny", table: "Wydarzenia"); migrationBuilder.DropColumn( name: "SekretSesjiHash", table: "UczestnicyOczekujacy"); } } }