Feature request -- Add option to generate conditional execution of create statements.

0 views
Skip to first unread message

Faron Dutton

unread,
Apr 1, 2012, 10:11:51 AM4/1/12
to DB Solo
I typically surround my create statements with a test to see if the
object already exists before creating the object.

A PostgreSQL example:

declare @C;
set @C = select count (*) from information_schema.tables where
table_schema = 'foo' and table_name = 'bar';
if cast (@C as integer) = 0
begin
create table bar ...
end


I keep a single upgrade script to reduce the amount of work required
when deploying changes to Production. This poses problems when doing
incremental development and deploying to QA. The script is written so
that it will not fail in QA if a table already exists but ensures that
everything is added to Production.
Reply all
Reply to author
Forward
0 new messages