You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrations: Provider-rendered annotations in code #6546
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:
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 IMigrationsAnnotationProvider.ForRemove().
Activity
[-]Migrations: Provider rendered-annotations in code[/-][+]Migrations: Provider-rendered annotations in code[/+]roji commentedon Sep 16, 2016
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.
bricelam commentedon Sep 16, 2016
Yes, AlterDatabase, AlterSequence, AlterTable, and AlterColumn have both the new and old annotation values. Drop operations will also have any old annotations provided by
IMigrationsAnnotationProvider.ForRemove().roji commentedon Mar 19, 2021
Wasn't this done in #21329 (there wasn't really a tracking issue aside from #16922)?
ajcvickers commentedon Mar 19, 2021
/cc @bricelam
bricelam commentedon Mar 19, 2021
No, this is about annotations inside the Up and Down methods--not the snapshot.