-
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
Migrations: Provider-rendered annotations in code #6546
Comments
Whatever mechanism the provider will have to specify its own rendering to annotations in migrations, note the importance of passing it the old annotation value in addition to the new. This is necessary to support more advanced scenario where structured data is represented in the annotation value, e.g. a list of PostgreSQL extensions. |
Yes, AlterDatabase, AlterSequence, AlterTable, and AlterColumn have both the new and old annotation values. Drop operations will also have any old annotations provided by |
/cc @bricelam |
No, this is about annotations inside the Up and Down methods--not the snapshot. |
This was part of #1825, but I'm splitting it out so we can prioritize it separately.
Currently, annotations on migration operations (and in the model snapshot) are rendered generally by the code generator:
Similar to how relational annotations are handled when scaffolding the model snapshot, providers should be given an opportunity to render these annotations to provider-specific extension methods. For example:
If a provider cannot render the annotation for the current language, the original syntax will be used as a fallback.
The text was updated successfully, but these errors were encountered: