Skip to content

Conversation

@ssteiner
Copy link

@ssteiner ssteiner commented Aug 5, 2024

This PR solves two issues:

  1. When downgrading the database version by setting MongoMigrationSettings.DatabaseMigrationVersion, the DatabaseMigrationRunner would run not only migrations with a version that is smaller than currentVersion, but any version that is not equal to toVersion.

  2. On .Net core, when you're providing a ConnectionString and Database in the MongoMigrationSettings, initialization would fail because of two checks that MongoMigrationSettings incorrectly enforce that both MongoMigrationSettings.ConnectionString and MongoMigrationSettings.ClientSettings be populated. Subsequent code shows that this isn't what was intended - initialization was prepared for both cases: when there's only a ConnectionString and when there's only ClientSettings . Hence I changed the initialization checks accordingly to allow initialization if only one of ConnectionString / ClientSettings is provided in MongoMigrationSettings.

Stephan Steiner added 2 commits August 5, 2024 19:32
…nd Database have been provided in IMongoMigrationSettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant