fix mysql migration (#1645)
* update dependencies; resync mysql db * manually fix mysql migration
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.1" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
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);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
||||
<PackageReference Include="NUnit" Version="4.1.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.1.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
||||
<PackageReference Include="NUnit" Version="4.1.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.1.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<PackageReference Include="Heron.MudCalendar" Version="1.1.1" />
|
||||
<PackageReference Include="HtmlSanitizer" Version="8.0.843" />
|
||||
<PackageReference Include="LanguageExt.Core" Version="4.4.8" />
|
||||
<PackageReference Include="Markdig" Version="0.35.0" />
|
||||
<PackageReference Include="Markdig" Version="0.36.2" />
|
||||
<PackageReference Include="MediatR.Courier.DependencyInjection" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.3" />
|
||||
|
||||
Reference in New Issue
Block a user