Re: databse version

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: databse version
Дата
Msg-id 51B65673.8020800@hogranch.com
обсуждение исходный текст
Ответ на databse version  (Philipp Kraus <philipp.kraus@flashpixx.de>)
Ответы Re: databse version  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
On 6/10/2013 12:52 AM, Philipp Kraus wrote:
> I'm creating a database and I have got a table with a "version" field.
> Can I update on structure changes (DDL) like create / update table
> increment this field automatically?
> I would like to create a versionizing for my database which counts the
> changes.
> IMHO I need a trigger, which is run if a DDL statement is fired on the
> database

so if someone runs a script that does a half dozen create/alters, you
want to bump your version that many times?

we handle our version control by not allowing anyone to make direct
changes, instead all changes need to be made with .sql scripts, of which
we maintain two sets, one to create a new schema version x.y, and the
other to update x.y-1 to x.y.   and yes, part of these scripts stores
the version in a configuration table of (key,value) pairs, like
('version','x.y')



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: databse version
Следующее
От: Aleksandr Furmanov
Дата:
Сообщение: INSERT RETURNING with values other than inserted ones.