Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 22FF19FB621 for ; Wed, 1 Aug 2007 17:37:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 86510-07 for ; Wed, 1 Aug 2007 17:37:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp135.iad.emailsrvr.com (smtp135.iad.emailsrvr.com [207.97.245.135]) by postgresql.org (Postfix) with ESMTP id 9880F9FB56D for ; Wed, 1 Aug 2007 17:37:37 -0300 (ADT) Received: by relay3.r3.iad.emailsrvr.com (Authenticated sender: erik-AT-myemma.com) with ESMTP id 2E4D446A163; Wed, 1 Aug 2007 16:37:36 -0400 (EDT) In-Reply-To: <20070801141724.49097d23.darcy@druid.net> References: <20070801113812.6a2d6fac.darcy@druid.net> <20070801141724.49097d23.darcy@druid.net> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Cc: "Scott Marlowe" , "John Mitchell" , pgsql-sql@postgresql.org Content-Transfer-Encoding: quoted-printable From: Erik Jones Subject: Re: How do I connect postgres table structures and view structures to an existing svn repository? Date: Wed, 1 Aug 2007 15:37:20 -0500 To: D'Arcy J.M. Cain X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/7 X-Sequence-Number: 28945 On Aug 1, 2007, at 1:17 PM, D'Arcy J.M. Cain wrote: > On Wed, 1 Aug 2007 11:46:11 -0500 > "Scott Marlowe" wrote: >> On 8/1/07, John Mitchell wrote: >>> I am trying to store schema definitions in version-control which =20 >>> I can do by >>> saving the definition and then importing into svn, but I would =20= >>> like it >>> to be automatic , so that when an update occurs to a table or =20 >>> view within >>> postgres then that table or view is flagged within svn. This =20 >>> would be >>> similar to what I currently do with source code that I have for a =20= >>> web app >>> within eclipse. >> >> My point being that you need to drive the changes from the svn side, >> not the database side. I've seen no reliable way to do it otherwise, >> but would love to be pleasantly surprised. > > You are right. It is always difficult to add structured control to > unstructured development methods. The method that I suggested was the > best I could think of to handle a database that is changed ad hoc with > no design work beforehand. If you work from the design side first you > can create schema documents that feed your database creation and use > svn to save those versions and document exactly why things changed. Another good idea is to include in these delta (or migration) scripts =20= the necessary sql to rollback the change. Then it's not too hard to =20 write a tool that you can give db connection params and a version # =20 to sync to. Erik Jones Software Developer | Emma=AE erik@myemma.com 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com