fix app startup with mysql (#2205)

* don't run pragma command on mysql

* add not required pathhash

* make media file path hash required

* update changelog
This commit is contained in:
Jason Dove
2025-07-26 17:48:03 +00:00
committed by GitHub
parent 9511e6e6a7
commit ab0f431c85
26 changed files with 18358 additions and 19 deletions
@@ -0,0 +1,38 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Add_MediaFilePathHash : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_MediaFile_Path",
table: "MediaFile");
migrationBuilder.AddColumn<string>(
name: "PathHash",
table: "MediaFile",
type: "TEXT",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PathHash",
table: "MediaFile");
migrationBuilder.CreateIndex(
name: "IX_MediaFile_Path",
table: "MediaFile",
column: "Path",
unique: true);
}
}
}