Options
CREATE OR ALTER instead of CREATE
OnanSalad
Posts: 5 Bronze 1
We're evaluating SQL Source Control against our current source control process and one of our requirements is that SQL object scripts in the repository use CREATE OR ALTER where applicable instead of the default CREATE. I expected to find this under "Comparison Options | Behavior," but I'm not seeing it there. Is SQL Source Control not compatible with CREATE OR ALTER syntax for applicable objects like stored procedures, functions, and views?
Tagged:
Best Answer
-
OptionsDavid Atkinson Posts: 1,439 Rose Gold 2Hi - thanks for evaluating SQL Source Control. You're right to look under comparison options, as this is where the option would be, as it inherits from capabilities offered in SQL Compare. Unfortunately, SQL Compare doesn't offer this just yet, but it's on the roadmap and I'd expect it early next year.
What is the reason you need CREATE OR ALTER today? Even if the scripts are stored as CREATEs, these will be converted to ALTERs as needed when you deploy the changes from source control to your target databases using SQL Compare.David Atkinson
Product Manager
Redgate Software
Answers
Product Manager
Redgate Software
I also run into this problem doing major refactorings (using SQL Compare to script out specific objects - comparing it to an empty database and doing text replace etc on the scripts) where i have to change all create statements to alter statements.
Any updates on the roadmap?
Thanks for letting us know about your use case. This enhancement is up for consideration and I've updated the request with the use case info you provided. It's just up for consideration and not something we're actively working on presently, but understanding customer impact definitely helps us.
Kendra