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

IfDatabase("SqlServer") matches "SqlServerCE" database type #422

Closed
stonkie opened this issue Jun 3, 2013 · 2 comments
Closed

IfDatabase("SqlServer") matches "SqlServerCE" database type #422

stonkie opened this issue Jun 3, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@stonkie
Copy link

stonkie commented Jun 3, 2013

When using the IfDatabase() method, "SqlServer" matches "SqlServerCE" and "SqlServer2000". It is impossible to execute an operation for SQLServer but not for SQLServerCE using the IfDatabase() method.

This is because the IfDatabaseExpressionRoot.DatabaseTypeApplies() method uses StartsWith() instead of Equals() to compare the database type names.

Is this "by design"?

@detoxhby
Copy link

The issue still exists and makes it impossible to distinguis between those database types.

The most awkward part is that SqlServerCe has tons of unsupported operations and throws exception, so its not even possible to silently ignore it.

The real problem lies here:


Every SqlServer up from 2005 will have this processor and would report only this to IfDatabase check.

Easy fixup would be to expose originally the used database provider for migrations to make decision based on that.

@fubar-coder
Copy link
Member

Duplicate of #387.
Workaround in release 2.0.0 is to use IfDatabase with predicate.

@fubar-coder fubar-coder added this to the 2.0.0 milestone Apr 10, 2018
@fubar-coder fubar-coder self-assigned this Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants