Re: Question - help needed

Поиск
Список
Период
Сортировка
От J. Roeleveld
Тема Re: Question - help needed
Дата
Msg-id 201011091856.05731.joost@antarean.org
обсуждение исходный текст
Ответ на Question - help needed  (Dragan Keselj <dragan.keselj@gmail.com>)
Ответы Re: Question - help needed  (Jayadevan M <Jayadevan.Maymala@ibsplc.com>)
Re: Question - help needed  (Oliver Charles <oliver@ocharles.org.uk>)
Список pgsql-novice
On Tuesday 09 November 2010 18:18:23 Dragan Keselj wrote:
> Hello,
>
> I have 2 identical databases. One is with data and second one is empty (for
> designing).
> Is it possible to make changes on empty database (for example to add,
> remove column or change name...) and, with these changes, refresh design
> of second one database (without data changes)?
>
> thnx for help

Hi,

Simple answer: yes and no...

More usefull answer:
If you make changes to the empty database using "ALTER TABLE" commands, you
should be able to use those same commands on the actual database.

But, if you delete a table/column/... that actually contains data, you WILL
loose that data.

If you redesign using DROP TABLE / CREATE TABLE commands, you will need to find
a tool that can compare 2 states of the database and create the ALTER TABLE
commands for you.

Same goes for other database objects, like VIEWs, INDEXes,....., etc.

--
Joost

PS. I'm not familiar with a free tool that can help with this, but that does
not mean there is no free tool.

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

Предыдущее
От: Dragan Keselj
Дата:
Сообщение: Question - help needed
Следующее
От: Jayadevan M
Дата:
Сообщение: Re: Question - help needed