using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TeleWave.Infrastructure.Migrations
{
///
public partial class AddBumpers : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "BumpersEnabled",
table: "Channels",
type: "boolean",
nullable: false,
defaultValue: false
);
migrationBuilder.CreateTable(
name: "BumperAssets",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
FromShowId = table.Column(type: "uuid", nullable: false),
ToShowId = table.Column(type: "uuid", nullable: false),
Signature = table.Column(
type: "character varying(128)",
maxLength: 128,
nullable: false
),
MediaAssetId = table.Column(type: "uuid", nullable: false),
CreatedAt = table.Column(
type: "timestamp with time zone",
nullable: false
),
},
constraints: table =>
{
table.PrimaryKey("PK_BumperAssets", x => x.Id);
}
);
migrationBuilder.CreateIndex(
name: "IX_BumperAssets_FromShowId_ToShowId_Signature",
table: "BumperAssets",
columns: new[] { "FromShowId", "ToShowId", "Signature" }
);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(name: "BumperAssets");
migrationBuilder.DropColumn(name: "BumpersEnabled", table: "Channels");
}
}
}