fix mysql migration (#1645)
* update dependencies; resync mysql db * manually fix mysql migration
This commit is contained in:
Generated
+5311
File diff suppressed because it is too large
Load Diff
+1
-30
@@ -6,19 +6,11 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Update_BlockUniqueIndex : Migration
|
||||
public partial class ResyncDb_DummyMigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Block_BlockGroupId",
|
||||
table: "Block");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Block_Name",
|
||||
table: "Block");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Id",
|
||||
table: "Writer",
|
||||
@@ -648,21 +640,11 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Block_BlockGroupId_Name",
|
||||
table: "Block",
|
||||
columns: new[] { "BlockGroupId", "Name" },
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Block_BlockGroupId_Name",
|
||||
table: "Block");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Id",
|
||||
table: "Writer",
|
||||
@@ -1292,17 +1274,6 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Block_BlockGroupId",
|
||||
table: "Block",
|
||||
column: "BlockGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Block_Name",
|
||||
table: "Block",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
{
|
||||
[DbContext(typeof(TvContext))]
|
||||
[Migration("20240305161535_Update_BlockUniqueIndex")]
|
||||
[Migration("20240318153913_Update_BlockUniqueIndex")]
|
||||
partial class Update_BlockUniqueIndex
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -20,7 +20,7 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.2")
|
||||
.HasAnnotation("ProductVersion", "8.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
@@ -0,0 +1,47 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Update_BlockUniqueIndex : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// migrationBuilder.DropIndex(
|
||||
// name: "IX_Block_BlockGroupId",
|
||||
// table: "Block");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Block_Name",
|
||||
table: "Block");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Block_BlockGroupId_Name",
|
||||
table: "Block",
|
||||
columns: new[] { "BlockGroupId", "Name" },
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Block_BlockGroupId_Name",
|
||||
table: "Block");
|
||||
|
||||
// migrationBuilder.CreateIndex(
|
||||
// name: "IX_Block_BlockGroupId",
|
||||
// table: "Block",
|
||||
// column: "BlockGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Block_Name",
|
||||
table: "Block",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.2")
|
||||
.HasAnnotation("ProductVersion", "8.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
Reference in New Issue
Block a user