Include 'IF EXISTS' in the generated scripts
The ability to include an option for 'IF EXISTS' based on the object type. The IF EXISTS would need to be generated per database object. This would greatly assist in cases where you have 'similar' yet slightly different environments that you expect to be the same, yet may have had a patch applied early etc.
You would need to be able to specify whether you drop and recreate, leave alone, or anything else that might make sense.
Thanks,
Nick
The ‘Add object existence checks’ option (Options—>Behaviour—>Add object existence checks) should do exactly this.
If there are specific cases where that option is not working, please email support@red-gate.com to let us know.
-
Nick Agren commented
Thanks David. It seems this might work. We will give it a go and see if it fits the bill.
-
If you go to Edit Project and Options, there is an option "Add object existence checks" and "User DROP and CREATE instead of ALTER". Is this what you are looking for?