create tables in correct filegroup with IgnoreFileGroups opt

jan.ahlbeckjan.ahlbeck Posts: 2
edited November 6, 2015 12:22PM in SQL Compare 11
Hello,

I have a problem that I can't find a solution for.

We use sql compare 11 (command line version) to create upgrade scripts for our database solution. We use filegroups and table partitioning. The partition function and partition schema names are the same on dev and production databases, but the number of partitions and filegroups in the partition schema differ on dev and production. When they differ, sql compare will rebuild all changed tables (which is not a option) and change the partition schemas and functions, which we do not want to. We do not want creation of filegroups and schemas to be part of the redgate upgrade script.

To not rebuild, we tried the IgnoreFileGroups option, but this result in new tables (CREATE TABLE...) do not have the partition scheme or filegroup (.. ON FG_DATA) in the redgate upgrade script. Then they are created on the default filegroup.

Is there a way to do this? Igore filegroups and partitions, but still include these in the update script on create statements?

Thanks
Jan

Comments

  • Hello Jan,

    Thanks for your question on the Ignore File Groups option. I don't think there is a way to do this. Once the option is ignored there is no way to partially turn it off, it will always be fully ignored. It might be possible if using SQL Source Control as well to create a migration script that would handle the partitions and file groups but this may be tricky if it is changing a lot between deployments.
    Allen LeVan
    Red Gate Software
    US Product Support
Sign In or Register to comment.