Re: Database config managment

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Database config managment
Дата
Msg-id dcc563d10812110917u10601d32n892fdc2138e651fa@mail.gmail.com
обсуждение исходный текст
Ответ на Database config managment  ("Thom Brown" <thombrown@gmail.com>)
Ответы Re: Database config managment  ("Thom Brown" <thombrown@gmail.com>)
Список pgsql-general
On Thu, Dec 11, 2008 at 5:30 AM, Thom Brown <thombrown@gmail.com> wrote:
> What do you folk think is the best way to manage deployments to databases?
> This would include things like table/view/function creations/changes and
> possibly static data changes.

The easiest way I've found to do it is to create a changetrack table
in pgsql, and then make each update use that.  You can get fancy if
you want, or just keep it simple.  For instance:

create table chtrack (id int primary key, changename text, changedesc text);

Then in a file you can have:

begin;
insert into chtrack (id, changename, changedesc) Values (10,'schema
create','This change creates the initial db schema');
create table
etc...
commit;

If any of the script fails, the whole thing does and your db doesn't
change.  Then you can create your new updates in a similar manner.

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Data Replication
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Data Replication