diff --git a/src/Weasel.Core/Migrations/DatabaseBase.cs b/src/Weasel.Core/Migrations/DatabaseBase.cs index 7c88373..13fd8b5 100644 --- a/src/Weasel.Core/Migrations/DatabaseBase.cs +++ b/src/Weasel.Core/Migrations/DatabaseBase.cs @@ -141,6 +141,9 @@ public async Task WriteCreationScriptToFileAsync(string filename, CancellationTo private async Task initializeSchemaWithNewConnection(CancellationToken ct) { + // Don't do this if it's unnecessary + if (!_initializers.Any()) return; + await using var conn = CreateConnection(); await conn.OpenAsync(ct).ConfigureAwait(false); await initializeSchema(conn, ct).ConfigureAwait(false);