using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SameBeat.Infrastructure.BazaDanych.Migracje
{
///
public partial class DodanoMikrofon : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "AktywnyMikrofonKoniecUtc",
table: "Wydarzenia",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn(
name: "AktywnyMikrofonUczestnikId",
table: "Wydarzenia",
type: "uuid",
nullable: true);
migrationBuilder.CreateTable(
name: "HistoriaMikrofonu",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
WydarzenieId = table.Column(type: "uuid", nullable: false),
UczestnikOczekujacyId = table.Column(type: "uuid", nullable: false),
StartUtc = table.Column(type: "timestamp with time zone", nullable: false),
KoniecPlanowanyUtc = table.Column(type: "timestamp with time zone", nullable: false),
KoniecFaktycznyUtc = table.Column(type: "timestamp with time zone", nullable: true),
CzasSekundy = table.Column(type: "integer", nullable: false),
PrzyznalHostNick = table.Column(type: "character varying(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HistoriaMikrofonu", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_HistoriaMikrofonu_WydarzenieId_UczestnikOczekujacyId",
table: "HistoriaMikrofonu",
columns: new[] { "WydarzenieId", "UczestnikOczekujacyId" });
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "HistoriaMikrofonu");
migrationBuilder.DropColumn(
name: "AktywnyMikrofonKoniecUtc",
table: "Wydarzenia");
migrationBuilder.DropColumn(
name: "AktywnyMikrofonUczestnikId",
table: "Wydarzenia");
}
}
}