-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
IsSqlServer etc migrationBuilder extensions #16956
IsSqlServer etc migrationBuilder extensions #16956
Conversation
(Rebased on top of release/3.0) |
src/EFCore.SqlServer/Extensions/SqlServerMigrationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
/// <param name="migrationBuilder"> The migrationBuilder from the parameters on <see cref="Migration.Up(MigrationBuilder)" /> or <see cref="Migration.Down(MigrationBuilder)" />. </param> | ||
/// <returns> True if SQL Server is being used; false otherwise. </returns> | ||
public static bool IsSqlServer([NotNull] this MigrationBuilder migrationBuilder) | ||
=> migrationBuilder.ActiveProvider.Equals( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ActiveProvider may be null. Best to use the static string.Equals()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
@bricelam this cannot be merged until the license bot is satisfied |
@dougbu I'm aware |
How do i know when to target master or release/x.0? |
Start on the repo's default branch (currently release/3.0). It changes depending on how close we are to releasing or how soon we start working on the next release. |
Migrations: Add IsSqlServer, etc. to MigrationBuilder
Fixes #8566