SQL Server Entity Framework code first DATA_COMPRESSION=PAGE

lztngnrs  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(91)

I'm using Entity Framework code-first with migrations. Works great but I would like all SQL Server tables created to have the DATA_COMPRESSION=PAGE option.

What would be the best approach to do that?

ohfgkhjo

ohfgkhjo1#

You can do with with a Custom Migration Operation that rebuilds the selected tables with page compression, eg

ALTER TABLE [Whatever] REBUILD WITH (DATA_COMPRESSION = PAGE)

相关问题