Skip to content

Commit 7f3c53e

Browse files
authored
Merge pull request #1390 from danielgerlag/copilot/fix-1333
Fix Entity Framework Core pending model changes warning using dynamic ProductVersion
2 parents 44ab58c + 216a1e3 commit 7f3c53e

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

src/providers/WorkflowCore.Persistence.MySQL/Migrations/MysqlPersistenceProviderModelSnapshot.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1515
#pragma warning disable 612, 618
1616
modelBuilder
1717
.HasAnnotation("Relational:MaxIdentifierLength", 64)
18-
.HasAnnotation("ProductVersion", "5.0.8");
18+
#if NETSTANDARD2_1
19+
.HasAnnotation("ProductVersion", "5.0.1")
20+
#elif NET6_0
21+
.HasAnnotation("ProductVersion", "7.0.0")
22+
#elif NET8_0
23+
.HasAnnotation("ProductVersion", "9.0.9")
24+
#else
25+
.HasAnnotation("ProductVersion", "9.0.9")
26+
#endif
27+
;
1928

2029
modelBuilder.Entity("WorkflowCore.Persistence.EntityFramework.Models.PersistedEvent", b =>
2130
{

src/providers/WorkflowCore.Persistence.Oracle/Migrations/OracleContextModelSnapshot.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1717
{
1818
#pragma warning disable 612, 618
1919
modelBuilder
20-
.HasAnnotation("ProductVersion", "6.0.3")
20+
#if NET6_0
21+
.HasAnnotation("ProductVersion", "7.0.0")
22+
#elif NET8_0
23+
.HasAnnotation("ProductVersion", "9.0.9")
24+
#else
25+
.HasAnnotation("ProductVersion", "9.0.9")
26+
#endif
2127
.HasAnnotation("Relational:MaxIdentifierLength", 128);
2228

2329
OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);

src/providers/WorkflowCore.Persistence.PostgreSQL/Migrations/PostgresPersistenceProviderModelSnapshot.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1717
{
1818
#pragma warning disable 612, 618
1919
modelBuilder
20-
.HasAnnotation("ProductVersion", "8.0.19")
20+
#if NETSTANDARD2_1
21+
.HasAnnotation("ProductVersion", "5.0.1")
22+
#elif NET6_0
23+
.HasAnnotation("ProductVersion", "7.0.0")
24+
#elif NET8_0
25+
.HasAnnotation("ProductVersion", "9.0.9")
26+
#else
27+
.HasAnnotation("ProductVersion", "9.0.9")
28+
#endif
2129
.HasAnnotation("Relational:MaxIdentifierLength", 63);
2230

2331
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

src/providers/WorkflowCore.Persistence.SqlServer/Migrations/SqlServerPersistenceProviderModelSnapshot.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1616
#pragma warning disable 612, 618
1717
modelBuilder
1818
.HasAnnotation("Relational:MaxIdentifierLength", 128)
19-
.HasAnnotation("ProductVersion", "5.0.8")
19+
#if NETSTANDARD2_1
20+
.HasAnnotation("ProductVersion", "5.0.1")
21+
#elif NET6_0
22+
.HasAnnotation("ProductVersion", "7.0.0")
23+
#elif NET8_0 || NET9_0
24+
.HasAnnotation("ProductVersion", "9.0.9")
25+
#else
26+
.HasAnnotation("ProductVersion", "9.0.9")
27+
#endif
2028
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
2129

2230
modelBuilder.Entity("WorkflowCore.Persistence.EntityFramework.Models.PersistedEvent", b =>

0 commit comments

Comments
 (0)