X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 6832511F6CF0 for ; Wed, 19 Apr 2006 21:45:22 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -1.94 X-Spam-Level: X-Spam-Status: No, score=-1.94 required=5 tests=[AWL=0.524, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id sjzwT1TIFhTr for ; Wed, 19 Apr 2006 21:45:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from a2s5.a2hosting.com (host-209-124-50-10.a2webhosting.com [209.124.50.10]) by postgresql.org (Postfix) with ESMTP id 3A86711F6F8E for ; Wed, 19 Apr 2006 21:45:13 -0300 (ADT) Received: from adsl-6-40-137.tys.bellsouth.net ([65.6.40.137] helo=[192.168.1.10]) by a2s5.a2hosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1FWNIH-0001oS-2s; Wed, 19 Apr 2006 20:45:13 -0400 In-Reply-To: <444680F0.5000809@andromeiberica.com> References: <444680F0.5000809@andromeiberica.com> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2237D1DC-525A-4571-9F16-BC4E54D847D8@pgedit.com> Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: 7bit From: John DeSoi Subject: Re: Schema synchronization Date: Wed, 19 Apr 2006 20:45:00 -0400 To: arnaulist@andromeiberica.com X-Mailer: Apple Mail (2.749.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s5.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Archive-Number: 200604/195 X-Sequence-Number: 21364 On Apr 19, 2006, at 2:26 PM, Arnau wrote: > I have several databases that I have to synchronize their > schemas. I have been testing several programs like EMS PostgreSQL > Comparer and Navicat PostgreSQL but none of them does all I need. > Any advise about what is the best way to sync the schemas? I think the best way is to do proper version control on files. After initial version 1, create version 2 as a series of create table, alter table, etc, statements to convert version 1 to version 2 and so on. Changing databases independently with your favorite admin tool and then trying to sync them up based on schema differences is difficult. For example, I don't think there is a way for a comparison program to know the difference between renaming a column and dropping a column with the addition a new one of the same type. The semantics of these two operations are very different. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL