Creating Foreign Key on a Table with missing Column
dbirdil
Posts: 8
I tried to promote only new tables to the target database. SQL Compare added SQL in the script to add a foreign key to an existing table for a column that does not exist yet.
Other than modifying the scripts, how can I get this tool not to generate SQL for changes to tables that are not being promoted at this time? I just wanted to create the new tables and not alter the foreign keys on other tables.
Other than modifying the scripts, how can I get this tool not to generate SQL for changes to tables that are not being promoted at this time? I just wanted to create the new tables and not alter the foreign keys on other tables.
Comments
The foreign key will be added to existing table once the new column is added. Before that happens I need to create a new table whose primary key is contains the values for the new column on the existing table.
SQL Compare when creating a new table should not generate foreign keys on other tables. Instead these foreign keys should be create when those tables changes are promoted.
I tried promoting one table at a time but SQL Compare did not work.
Sorry, but I need to ask you for some SQL Compare schema snapshots from your databases. Can you please send them to support@red-gate.com? Also, can I verify you're using v5.2?
Thanks!