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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user