Migrations fix
All checks were successful
Build Docker Images / test (push) Successful in 1m18s
Build Docker Images / build-and-push (push) Successful in 1m31s

This commit is contained in:
Michał Zieliński
2025-11-12 14:09:47 +01:00
parent eeae4b55a4
commit 29aae21f97
21 changed files with 41 additions and 21 deletions

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20221205190148_Initial")] [Migration("20221205190148_Initial")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20221211210507_DataSetsAndDataRows")] [Migration("20221211210507_DataSetsAndDataRows")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20221219163620_RenameFields")] [Migration("20221219163620_RenameFields")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20221221165749_DataSetIdOnDataRow")] [Migration("20221221165749_DataSetIdOnDataRow")]

View File

@@ -15,6 +15,11 @@ namespace DiunaBI.Infrastructure.Migrations
name: "FK_DataRows_DataSets_DataSetId", name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows"); table: "DataRows");
// DODAJ: Usuń index przed zmianą kolumny
migrationBuilder.DropIndex(
name: "IX_DataRows_DataSetId",
table: "DataRows");
migrationBuilder.AlterColumn<Guid>( migrationBuilder.AlterColumn<Guid>(
name: "DataSetId", name: "DataSetId",
table: "DataRows", table: "DataRows",
@@ -25,6 +30,12 @@ namespace DiunaBI.Infrastructure.Migrations
oldType: "uniqueidentifier", oldType: "uniqueidentifier",
oldNullable: true); oldNullable: true);
// DODAJ: Odtwórz index po zmianie kolumny
migrationBuilder.CreateIndex(
name: "IX_DataRows_DataSetId",
table: "DataRows",
column: "DataSetId");
migrationBuilder.AddForeignKey( migrationBuilder.AddForeignKey(
name: "FK_DataRows_DataSets_DataSetId", name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows", table: "DataRows",
@@ -41,6 +52,10 @@ namespace DiunaBI.Infrastructure.Migrations
name: "FK_DataRows_DataSets_DataSetId", name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows"); table: "DataRows");
migrationBuilder.DropIndex(
name: "IX_DataRows_DataSetId",
table: "DataRows");
migrationBuilder.AlterColumn<Guid>( migrationBuilder.AlterColumn<Guid>(
name: "DataSetId", name: "DataSetId",
table: "DataRows", table: "DataRows",
@@ -48,6 +63,11 @@ namespace DiunaBI.Infrastructure.Migrations
nullable: true, nullable: true,
oldClrType: typeof(Guid), oldClrType: typeof(Guid),
oldType: "uniqueidentifier"); oldType: "uniqueidentifier");
migrationBuilder.CreateIndex(
name: "IX_DataRows_DataSetId",
table: "DataRows",
column: "DataSetId");
migrationBuilder.AddForeignKey( migrationBuilder.AddForeignKey(
name: "FK_DataRows_DataSets_DataSetId", name: "FK_DataRows_DataSets_DataSetId",
@@ -57,4 +77,4 @@ namespace DiunaBI.Infrastructure.Migrations
principalColumn: "Id"); principalColumn: "Id");
} }
} }
} }

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20230106095427_RenameModels")] [Migration("20230106095427_RenameModels")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20230626171614_LayerType")] [Migration("20230626171614_LayerType")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20230821105757_Record.Values")] [Migration("20230821105757_Record.Values")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20230917110252_Layer.parent")] [Migration("20230917110252_Layer.parent")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20230918090621_ProcessSource")] [Migration("20230918090621_ProcessSource")]

View File

@@ -11,7 +11,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20230918093055_TypeO")] [Migration("20230918093055_TypeO")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20231030142419_Record.Value32")] [Migration("20231030142419_Record.Value32")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20240309075645_Change record value type")] [Migration("20240309075645_Change record value type")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20240703171630_AfterCodeRefactor")] [Migration("20240703171630_AfterCodeRefactor")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20240703173337_DataInboxModel")] [Migration("20240703173337_DataInboxModel")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20240825144443_QueueJobs")] [Migration("20240825144443_QueueJobs")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20250317114722_LongerDesc1")] [Migration("20250317114722_LongerDesc1")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20250529093632_LayersIsCancelled")] [Migration("20250529093632_LayersIsCancelled")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20250607084540_QueueJobRefactor")] [Migration("20250607084540_QueueJobRefactor")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20250725133501_DataInbox.LayerId")] [Migration("20250725133501_DataInbox.LayerId")]

View File

@@ -10,7 +10,7 @@ using DiunaBI.Infrastructure.Data;
#nullable disable #nullable disable
namespace DiunaBI.Core.Migrations namespace DiunaBI.Infrastructure.Migrations
{ {
[DbContext(typeof(AppDbContext))] [DbContext(typeof(AppDbContext))]
[Migration("20250726091001_Remove DataInbox.LayerId")] [Migration("20250726091001_Remove DataInbox.LayerId")]