Skip to content

Add wildcard (*) support to GetMigrations, ScriptMigration, and DropDatabase#38327

Open
BrunoSync wants to merge 1 commit into
dotnet:mainfrom
BrunoSync:feature/wildcard-support-migrations-operations
Open

Add wildcard (*) support to GetMigrations, ScriptMigration, and DropDatabase#38327
BrunoSync wants to merge 1 commit into
dotnet:mainfrom
BrunoSync:feature/wildcard-support-migrations-operations

Conversation

@BrunoSync
Copy link
Copy Markdown
Contributor

Implements wildcard (*) support for contextType in three methods of MigrationsOperations, following the same pattern established in the previous wildcard implementation.

Changes:

  • GetMigrations: iterates all contexts and aggregates MigrationInfo results
  • ScriptMigration: iterates all contexts and concatenates generated scripts
  • DropDatabase: iterates all contexts and drops each database

Not implemented:

  • RemoveMigration: wildcard not applicable — the command only supports unapplied migrations, making a wildcard operation semantically ambiguous
  • GetContextInfo: current signature returns a single ContextInfo object. Supporting wildcard would require changing the return type to IEnumerable, which is a breaking change. Happy to implement if the team decides on the preferred approach. Same for AddMigrations.

Tested manually.

@BrunoSync BrunoSync requested a review from a team as a code owner May 29, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant