Skip to content

Commit 74b858a

Browse files
committed
Depend on EF 9.0.1
1 parent 2e59bf5 commit 74b858a

File tree

4 files changed

+41
-14
lines changed

4 files changed

+41
-14
lines changed

Directory.Packages.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
3-
<EFCoreVersion>[9.0.0,10.0.0)</EFCoreVersion>
4-
<MicrosoftExtensionsVersion>9.0.0</MicrosoftExtensionsVersion>
3+
<EFCoreVersion>[9.0.1,10.0.0)</EFCoreVersion>
4+
<MicrosoftExtensionsVersion>9.0.1</MicrosoftExtensionsVersion>
55
<NpgsqlVersion>9.0.2</NpgsqlVersion>
66
</PropertyGroup>
77

test/EFCore.PG.FunctionalTests/Migrations/MigrationsInfrastructureNpgsqlTest.cs

+15-10
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,28 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Migrations
77
public class MigrationsInfrastructureNpgsqlTest(MigrationsInfrastructureNpgsqlTest.MigrationsInfrastructureNpgsqlFixture fixture)
88
: MigrationsInfrastructureTestBase<MigrationsInfrastructureNpgsqlTest.MigrationsInfrastructureNpgsqlFixture>(fixture)
99
{
10-
// TODO: Remove once we sync to https://github.com/dotnet/efcore/pull/35106
11-
public override void Can_generate_no_migration_script()
12-
{
13-
}
14-
15-
// TODO: Remove once we sync to https://github.com/dotnet/efcore/pull/35106
16-
public override void Can_generate_migration_from_initial_database_to_initial()
17-
{
18-
}
19-
2010
public override void Can_get_active_provider()
2111
{
2212
base.Can_get_active_provider();
2313

2414
Assert.Equal("Npgsql.EntityFrameworkCore.PostgreSQL", ActiveProvider);
2515
}
2616

17+
// See #3407
18+
public override void Can_apply_two_migrations_in_transaction()
19+
=> Assert.ThrowsAny<Exception>(() => base.Can_apply_two_migrations_in_transaction());
20+
21+
// See #3407
22+
public override Task Can_apply_two_migrations_in_transaction_async()
23+
=> Assert.ThrowsAnyAsync<Exception>(() => base.Can_apply_two_migrations_in_transaction_async());
24+
25+
// This tests uses Fixture.CreateEmptyContext(), which does not go through MigrationsInfrastructureNpgsqlFixture.CreateContext()
26+
// and therefore does not set the PostgresVersion in the context options. As a result, we try to drop the database with
27+
// WITH (FORCE), which is only supported starting with PG 13.
28+
[MinimumPostgresVersion(13, 0)]
29+
public override Task Can_generate_no_migration_script()
30+
=> base.Can_generate_no_migration_script();
31+
2732
[ConditionalFact(Skip = "https://github.com/dotnet/efcore/issues/33056")]
2833
public override void Can_apply_all_migrations()
2934
=> base.Can_apply_all_migrations();

test/EFCore.PG.FunctionalTests/Query/EnumQueryTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ await AssertQuery(
221221

222222
AssertSql(
223223
"""
224-
@values={ 'Sad' } (DbType = Object)
224+
@__values_0={ 'Sad' } (DbType = Object)
225225
226226
SELECT s."Id", s."ByteEnum", s."EnumValue", s."InferredEnum", s."MappedEnum", s."SchemaQualifiedEnum", s."UnmappedByteEnum", s."UnmappedEnum", s."UppercaseNamedEnum"
227227
FROM test."SomeEntities" AS s
228-
WHERE s."UppercaseNamedEnum" = ANY (@values)
228+
WHERE s."UppercaseNamedEnum" = ANY (@__values_0)
229229
""");
230230
}
231231

test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs

+22
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,28 @@ await AssertQuery(
528528
""");
529529
}
530530

531+
public override async Task Parameter_collection_ImmutableArray_of_ints_Contains_int(bool async)
532+
{
533+
await base.Parameter_collection_ImmutableArray_of_ints_Contains_int(async);
534+
535+
AssertSql(
536+
"""
537+
@__ints_0={ '10', '999' } (Nullable = false) (DbType = Object)
538+
539+
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."String", p."Strings"
540+
FROM "PrimitiveCollectionsEntity" AS p
541+
WHERE p."Int" = ANY (@__ints_0)
542+
""",
543+
//
544+
"""
545+
@__ints_0={ '10', '999' } (Nullable = false) (DbType = Object)
546+
547+
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."String", p."Strings"
548+
FROM "PrimitiveCollectionsEntity" AS p
549+
WHERE NOT (p."Int" = ANY (@__ints_0) AND p."Int" = ANY (@__ints_0) IS NOT NULL)
550+
""");
551+
}
552+
531553
public override async Task Parameter_collection_of_ints_Contains_nullable_int(bool async)
532554
{
533555
await base.Parameter_collection_of_ints_Contains_nullable_int(async);

0 commit comments

Comments
 (0)