Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use the database to build creation script if there are no init… #149

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Weasel.Core/Migrations/DatabaseBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@

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);
Expand Down Expand Up @@ -354,7 +357,7 @@

public virtual IFeatureSchema FindFeature(Type featureType)
{
return null; // TODO - could get smarter and try to create by type

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres ionx/postgres-plv8:12.2 Case Sensitive false

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres ionx/postgres-plv8:12.2 Case Sensitive false

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres ionx/postgres-plv8:12.2 Case Sensitive false

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / MSSQL mcr.microsoft.com/mssql/server:2019-latest

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / MSSQL mcr.microsoft.com/mssql/server:2019-latest

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / MSSQL mcr.microsoft.com/mssql/server:2019-latest

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / MSSQL mcr.microsoft.com/mssql/server:2022-latest

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / MSSQL mcr.microsoft.com/mssql/server:2022-latest

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / MSSQL mcr.microsoft.com/mssql/server:2022-latest

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres postgres:15.3-alpine Case Sensitive true

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres postgres:15.3-alpine Case Sensitive true

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres postgres:15.3-alpine Case Sensitive true

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres postgres:15.3-alpine Case Sensitive false

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres postgres:15.3-alpine Case Sensitive false

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres postgres:15.3-alpine Case Sensitive false

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres ionx/postgres-plv8:12.2 Case Sensitive true

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres ionx/postgres-plv8:12.2 Case Sensitive true

Possible null reference return.

Check warning on line 360 in src/Weasel.Core/Migrations/DatabaseBase.cs

View workflow job for this annotation

GitHub Actions / Postgres ionx/postgres-plv8:12.2 Case Sensitive true

Possible null reference return.
}

public void MarkAllFeaturesAsChecked()
Expand Down
Loading