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

Consider Migrations behavior when store-generated GUID doesn't have DefaultValueSql set #14532

Open
ajcvickers opened this issue Jan 28, 2019 · 1 comment

Comments

@ajcvickers
Copy link
Member

See issue #14518. In this case, the property should be treated as store-generated by the update pipeline because:

  • It is configured to have a generated value
  • It has no associated value generator

This makes sense when the database already exists, but if the database is being created by migrations then we don't know what default constraint makes sense. Options discussed were:

  • Warn in Migrations (may need us to build a mechanism to do so)
  • Warn in model validation (warning will be shown even when database exists and is fine)
  • Set a sensible default constraint by convention (for example, newsequentialid() for GUIDs on SQL Server; less clear what makes sense for other types and other providers.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants