84 lines
2.6 KiB
C#
84 lines
2.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BLAIzor.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class EmbeddingServiceAndDefaultLanguage : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.RenameColumn(
|
|
name: "voiceId",
|
|
table: "SiteInfos",
|
|
newName: "VoiceId");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "BackgroundVideo",
|
|
table: "SiteInfos",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "DefaultLanguage",
|
|
table: "SiteInfos",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "EmbeddingService",
|
|
table: "SiteInfos",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "StoredHtml",
|
|
table: "MenuItems",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "SiteInfos",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
columns: new[] { "BackgroundVideo", "DefaultLanguage", "EmbeddingService" },
|
|
values: new object[] { null, null, null });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "BackgroundVideo",
|
|
table: "SiteInfos");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DefaultLanguage",
|
|
table: "SiteInfos");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EmbeddingService",
|
|
table: "SiteInfos");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "VoiceId",
|
|
table: "SiteInfos",
|
|
newName: "voiceId");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "StoredHtml",
|
|
table: "MenuItems",
|
|
type: "nvarchar(max)",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)",
|
|
oldNullable: true);
|
|
}
|
|
}
|
|
}
|