Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (Postfix) with ESMTP id 81FC74759FA for ; Mon, 4 Mar 2002 08:08:34 -0500 (EST) Received: from roberto by brasileiro.net with local (Exim 3.34 #1 (Debian)) id 16hsD9-0006MG-00; Mon, 04 Mar 2002 06:09:03 -0700 Date: Mon, 4 Mar 2002 06:09:03 -0700 From: Roberto Mello To: Janning Vygen Cc: pgsql-sql@postgresql.org Subject: Re: thinking about versioning my database schema Message-ID: <20020304130903.GA24076@cc.usu.edu> References: <200203040710.g247AOj05681@janning.planwerk6.local> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <200203040710.g247AOj05681@janning.planwerk6.local> User-Agent: Mutt/1.3.27i X-message-flag: Please consider using an e-mail program other than Outlook. It's insecure. X-Archive-Number: 200203/34 X-Sequence-Number: 6916 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!!