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
Ming Chen
shared this idea