conditionally executing migration code

Поиск
Список
Период
Сортировка
От Michael P. Soulier
Тема conditionally executing migration code
Дата
Msg-id 48482D5E.9050201@mitel.com
обсуждение исходный текст
Ответы Re: conditionally executing migration code  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
I'm using some simple migration code to execute individual fragments of
SQL code based on the version of the schema. Is there a way to perform
an ALTER TABLE conditionally?

Example:

I want to add column foo to table bar, but only if column foo does not
exist already.

I'm trying to avoid such situations, but it's not always easy.

Thanks,
Mike
--
Michael P. Soulier <michael_soulier@mitel.com>, 613-592-2122 x2522
"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction." --Albert Einstein

В списке pgsql-general по дате отправления:

Предыдущее
От: "Francisco Reyes"
Дата:
Сообщение: Bizgrez dead?
Следующее
От: Tim Tassonis
Дата:
Сообщение: Re: Temporary Tables and Web Application