Option to ignore preserving data when adding a NOT NULL column to a table
SQL Compare tries to preserve data from table when adding a new NOT NULL column and adds below steps to deployment script:
1. Create a new table B with same structure from original table A
2. Perform INSERT INTO table B SELECT * FROM Table A
3. DROP Table A
4. Rename Table B to Table A
The issue:
For example if we add a new column to a ETL table with 1M rows. We don't need data to be preserved since table gets populated during ETL process. The deployment script without manually remove INSERT statement will take a very long time and may cause trouble on DBAs.
5
votes
![](https://secure.gravatar.com/avatar/b4369b2f3ed493199b05d9b467f93188?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)