pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Mello <rmello@cc.usu.edu>
To: Janning Vygen <vygen@gmx.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: thinking about versioning my database schema
Date: Mon, 4 Mar 2002 06:09:03 -0700
Message-ID: <20020304130903.GA24076@cc.usu.edu> (raw)
In-Reply-To: <200203040710.g247AOj05681@janning.planwerk6.local>
References: <200203040710.g247AOj05681@janning.planwerk6.local>

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.

-Roberto

-- 
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ 
       http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer    
Make way! Make way! A PROGRAMMER HAS ARRIVED!!



view thread (5+ messages)  latest in thread

Message-ID: <20020304130903.GA24076@cc.usu.edu>
Permalink:  ../20020304130903.GA24076@cc.usu.edu/
Also on:    postgresql.org/message-id/20020304130903.GA24076@cc.usu.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rmello@cc.usu.edu, vygen@gmx.de
  Subject: Re: thinking about versioning my database schema
  In-Reply-To: <20020304130903.GA24076@cc.usu.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox