Open deadcativan opened 4 months ago
Makes sense - @hmajerus are you interested in submitting a PR for this, as you did the original PR for the index case (#30408)?
Makes sense - @hmajerus are you interested in submitting a PR for this, as you did the original PR for the index case (#30408)?
Yeah, I can look into it later next week.
So, did not get to this last week. Fairly busy lately and for the next month so won't get to this anytime soon, but think I could do it for the EF9 release. If someone else wants to do it before then that's fine with me.
In #30408 index options "DATA_COMPRESSION" is supported, I think there is another place where the same thing is needed. It's the primary key when creating a table for an entity.
Currently I create a custom class extends SqlServerAnnotationProvider to add annotation for data compression as following:
And then I extend SqlServerMigrationsSqlGenerator to build SQL for index options according to this annotation in AddPrimaryKeyOperation and AddUniqueConstraintOperation.
Finally I add extension methods xxx.UseDataCompression like the way index does.