When does the deployment process rebuild tables?
Published 04 June 2013
SQL Compare will alter existing tables whenever possible when it deploys database schema, but sometimes the entire table must be dropped and recreated. This involves creating a new table, copying all of the data to the new table, and dropping the old table.
SQL Compare will do this in these circumstances:
- Changing an IDENTITY seed or increment value, or dropping the IDENTITY property from a column
- Adding a column in the middle of a table when the 'force column order' option is enabled
- When you add, alter or drop PERSISTED computed columns
- When it's impossible to implicitly cast one data type to another (e.g. DECIMAL to NUMERIC)
- Changing the filegroup specification for a table
- Changing partitioned columns
- Adding a column that has no default and does not accept NULL values
- Azure: when an ALTER COLUMN will cause a Primary Key or clustered index to be dropped and data exists in the table