diff --git a/src/CoreTests/Partitioning/partitioning_configuration.cs b/src/CoreTests/Partitioning/partitioning_configuration.cs index dda6e62b99..a1b692b11e 100644 --- a/src/CoreTests/Partitioning/partitioning_configuration.cs +++ b/src/CoreTests/Partitioning/partitioning_configuration.cs @@ -37,7 +37,7 @@ public void configure_for_soft_deleted() var table = tableFor(); var partitioning = table.Partitioning.ShouldBeOfType(); - partitioning.Partitions.Single().ShouldBe(new ListPartition("deleted", "TRUE")); + partitioning.Partitions.Single().ShouldBe(new ListPartition("deleted", "true")); } [Fact] @@ -48,7 +48,7 @@ public void configure_for_soft_deleted_and_index() var table = tableFor(); var partitioning = table.Partitioning.ShouldBeOfType(); - partitioning.Partitions.Single().ShouldBe(new ListPartition("deleted", "TRUE")); + partitioning.Partitions.Single().ShouldBe(new ListPartition("deleted", "true")); } [Fact] @@ -60,13 +60,13 @@ public void all_documents_are_soft_deleted_and_partitioned() .ShouldBeOfType() .Partitions .Single() - .ShouldBe(new ListPartition("deleted", "TRUE")); + .ShouldBe(new ListPartition("deleted", "true")); tableFor().Partitioning .ShouldBeOfType() .Partitions .Single() - .ShouldBe(new ListPartition("deleted", "TRUE")); + .ShouldBe(new ListPartition("deleted", "true")); } [Fact] diff --git a/src/CoreTests/Partitioning/partitioning_migrations.cs b/src/CoreTests/Partitioning/partitioning_migrations.cs index ddcc65e8a0..9bd75588df 100644 --- a/src/CoreTests/Partitioning/partitioning_migrations.cs +++ b/src/CoreTests/Partitioning/partitioning_migrations.cs @@ -52,4 +52,29 @@ public async Task should_create_delta_for_adding_all_new_partitions() var migration = await store2.Storage.CreateMigrationAsync(); migration.Difference.ShouldBe(SchemaPatchDifference.Update); } + + [Fact] + public async Task partitioning_with_soft_deletes_multiple_migrations() + { + StoreOptions(opts => + { + opts.Schema.For(); + }); + + await theStore.Storage.ApplyAllConfiguredChangesToDatabaseAsync(); + + var store2 = SeparateStore(opts => + { + opts.Schema.For().SoftDeletedWithPartitioning(); + }); + + await store2.Storage.ApplyAllConfiguredChangesToDatabaseAsync(); + + var store3 = SeparateStore(opts => + { + opts.Schema.For().SoftDeletedWithPartitioning(); + }); + + await store3.Storage.Database.AssertDatabaseMatchesConfigurationAsync(); + } } diff --git a/src/DocumentDbTests/Deleting/soft_deletes.cs b/src/DocumentDbTests/Deleting/soft_deletes.cs index f7520ed2fa..1ad70e651e 100644 --- a/src/DocumentDbTests/Deleting/soft_deletes.cs +++ b/src/DocumentDbTests/Deleting/soft_deletes.cs @@ -708,7 +708,7 @@ public async Task should_partition_through_attribute() var table = new DocumentTable(theStore.Options.Storage.MappingFor(typeof(SoftDeletedAndPartitionedDocument))); var partitioning = table.Partitioning.ShouldBeOfType(); - partitioning.Partitions.Single().ShouldBe(new ListPartition("deleted", "TRUE")); + partitioning.Partitions.Single().ShouldBe(new ListPartition("deleted", "true")); } } diff --git a/src/EventSourcingTests/building_events_and_streams_table_based_on_partitioning.cs b/src/EventSourcingTests/building_events_and_streams_table_based_on_partitioning.cs index d7766f4789..1b184c68cd 100644 --- a/src/EventSourcingTests/building_events_and_streams_table_based_on_partitioning.cs +++ b/src/EventSourcingTests/building_events_and_streams_table_based_on_partitioning.cs @@ -29,7 +29,7 @@ public void events_table_build_partitioning_when_active() var table = new EventsTable(theGraph); var partitioning = table.Partitioning.ShouldBeOfType(); partitioning.Columns.Single().ShouldBe(IsArchivedColumn.ColumnName); - partitioning.Partitions.Single().ShouldBe(new ListPartition("archived", "TRUE")); + partitioning.Partitions.Single().ShouldBe(new ListPartition("archived", "true")); table.PrimaryKeyColumns.ShouldContain(IsArchivedColumn.ColumnName); } @@ -42,7 +42,7 @@ public void streams_table_build_partitioning_when_active() var table = new StreamsTable(theGraph); var partitioning = table.Partitioning.ShouldBeOfType(); partitioning.Columns.Single().ShouldBe(IsArchivedColumn.ColumnName); - partitioning.Partitions.Single().ShouldBe(new ListPartition("archived", "TRUE")); + partitioning.Partitions.Single().ShouldBe(new ListPartition("archived", "true")); table.PrimaryKeyColumns.ShouldContain(IsArchivedColumn.ColumnName); } diff --git a/src/Marten.CommandLine/Marten.CommandLine.csproj b/src/Marten.CommandLine/Marten.CommandLine.csproj index d697b1effa..dff27d2958 100644 --- a/src/Marten.CommandLine/Marten.CommandLine.csproj +++ b/src/Marten.CommandLine/Marten.CommandLine.csproj @@ -36,7 +36,7 @@ - + diff --git a/src/Marten/Marten.csproj b/src/Marten/Marten.csproj index a8f6ac0d36..8bd2db29f4 100644 --- a/src/Marten/Marten.csproj +++ b/src/Marten/Marten.csproj @@ -60,7 +60,7 @@ - +