Re: thinking about versioning my database schema

From: Janning Vygen <vygen(at)gmx(dot)de>
To: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: thinking about versioning my database schema
Date: 2002-03-04 13:49:35
Message-ID: 200203041349.g24Dnaj10826@janning.planwerk6.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Am Montag, 4. März 2002 14:09 schrieb Roberto Mello:
> On Mon, Mar 04, 2002 at 08:10:24AM +0100, Janning Vygen wrote:
> > So i am saving the schema version inside the databse. Is it a
> > good idea? or is it nonsens and there is a much better way how to
> > do it?
>
> Yeah, but then you'd have to change your queries to be able to
> query the new tables.
>
> > I dont want to recreate the database every time because i want to
> > keep my testdata present.
>
> How about a script that dumps your data, dumps your db, reloads the
> table definitions, then reloads your data? You could have a table
> with rows for every table that would keep track of the current
> version you have, that could be updated when this script ran.

i cant reload my dumped data if the table definition changed. maybe i
have renamed a column or something like this. how should my dumped
data know this? So i have to write an update script. But then i have
to write the new schema AND have to write update scripts and still
hve trouble with other developers who should easily get a
corresponding schema for alle the queries they just fetched via cvs

janning

> -Roberto

--
Planwerk 6 /websolutions
Herzogstraße 86
40215 Düsseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-03-04 15:13:30 Re: Indexes and outer join?
Previous Message Roberto Mello 2002-03-04 13:09:03 Re: thinking about versioning my database schema

Browse pgsql-sql by date

  From Date Subject
Next Message Matthew Price 2002-03-04 18:02:37 Changing sequence cache
Previous Message Roberto Mello 2002-03-04 13:09:03 Re: thinking about versioning my database schema