I found a way to do it. One problem remains: The order of the columns
can't be changed.
Any change to make postgres support this in the future?
pg_dump -s prod | strip-schema-dump.py - > prod.schema
pg_dump -s devel | strip-schema-dump.py - > devel.schema
strip-schema-dump.py removes some stuff which I don't care about (Owner, Comments, ...)
kdiff3 prod.schema devel.schema
You need to create an upgrade script by looking at the diff.
But it is not difficult:
alter table ... add column ...;
Execute on production:
cat update-YYYY-MM-DD.sql | psql
David Fetter schrieb:
> On Thu, Oct 30, 2008 at 10:54:46AM +0100, Thomas Guettler wrote:
>> is there a schema upgrade howto? I could not find much with google.
>> There is a running DB and a development DB. The development DB
>> has some tables, columns and indexes added.
> The only sure way to track such changes is by changing the
> databases--especially in development--only via scripts, all of which
> go into your source code management system.
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
In response to
pgsql-general by date
|Next:||From: Nikolas Everett||Date: 2008-10-30 13:40:59|
|Subject: Re: excluding tables from VACUUM ANALYZE|
|Previous:||From: Teodor Sigaev||Date: 2008-10-30 13:37:40|
|Subject: Re: Weird problem concerning tsearch functions built into
postgres 8.3, assistance requested|