From 2c5e60408947aea9e5bccafa6d098d10af8250d1 Mon Sep 17 00:00:00 2001 From: "Jeremy D. Miller" Date: Wed, 18 Sep 2024 07:25:37 +0200 Subject: [PATCH] Upgrading to Weasel 7.11, bumping to 7.28 --- Directory.Build.props | 2 +- src/Marten/Marten.csproj | 2 +- src/Marten/Schema/MartenManagedTenantListPartitions.cs | 1 - src/Marten/Storage/DefaultTenancy.cs | 8 +++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0b01f07c54..5eb8c51229 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 7.27.0 + 7.28.0 12.0 Jeremy D. Miller;Babu Annamalai;Oskar Dudycz;Joona-Pekka Kokko https://martendb.io/logo.png diff --git a/src/Marten/Marten.csproj b/src/Marten/Marten.csproj index ec4bc1f664..b9f78ff081 100644 --- a/src/Marten/Marten.csproj +++ b/src/Marten/Marten.csproj @@ -48,7 +48,7 @@ - + diff --git a/src/Marten/Schema/MartenManagedTenantListPartitions.cs b/src/Marten/Schema/MartenManagedTenantListPartitions.cs index 7f3328cc4a..504ccc3f8e 100644 --- a/src/Marten/Schema/MartenManagedTenantListPartitions.cs +++ b/src/Marten/Schema/MartenManagedTenantListPartitions.cs @@ -28,7 +28,6 @@ public MartenManagedTenantListPartitions(StoreOptions options, string? schemaNam _options.Storage.Add(Partitions); _options.TenantPartitions = this; - } public ManagedListPartitions Partitions { get; } diff --git a/src/Marten/Storage/DefaultTenancy.cs b/src/Marten/Storage/DefaultTenancy.cs index 461727507a..6ceedc85ae 100644 --- a/src/Marten/Storage/DefaultTenancy.cs +++ b/src/Marten/Storage/DefaultTenancy.cs @@ -49,7 +49,13 @@ public ValueTask> BuildDatabases() internal void Initialize() { - Default = new Tenant(DefaultTenantId, new MartenDatabase(Options, _dataSource, Options.StoreName)); + var martenDatabase = new MartenDatabase(Options, _dataSource, Options.StoreName); + if (Options.TenantPartitions != null) + { + martenDatabase.AddInitializer(Options.TenantPartitions.Partitions); + } + + Default = new Tenant(DefaultTenantId, martenDatabase); } public void Dispose()