Return-Path: Delivered-To: apmail-continuum-users-archive@www.apache.org Received: (qmail 38701 invoked from network); 11 Feb 2009 17:10:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2009 17:10:04 -0000 Received: (qmail 14258 invoked by uid 500); 11 Feb 2009 17:10:02 -0000 Delivered-To: apmail-continuum-users-archive@continuum.apache.org Received: (qmail 14233 invoked by uid 500); 11 Feb 2009 17:10:02 -0000 Mailing-List: contact users-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@continuum.apache.org Delivered-To: mailing list users@continuum.apache.org Received: (qmail 14222 invoked by uid 99); 11 Feb 2009 17:10:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 09:10:02 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of emmanuel.venisse@gmail.com designates 209.85.220.10 as permitted sender) Received: from [209.85.220.10] (HELO mail-fx0-f10.google.com) (209.85.220.10) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 17:09:53 +0000 Received: by fxm3 with SMTP id 3so516816fxm.3 for ; Wed, 11 Feb 2009 09:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=oi1CmPnz/6QqdXjtm5BEPUcjH8w5Xtl5KEZ5MkSfwis=; b=C1wD4IYJSEUxpUAPr4tNfhM1IqkH+WS3rYpqXH2of91ibMrNM9z9U74/tf9dXnwk4y 1276pK5sronSANVe4rTxmBsEhQ54/qxCoq3SvI1tO8fG6Mv+fP88t0bcIRA4EGUwICNu bFJvN3Z1J3aj2b9Bl4QEXV/y1C25DjPjSMfac= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kvTJNMila4V1y5/VXAm1ONNAS/4meoWn6Usq08vQ/eSHPVqmLBrgVnh/8Rm55V8pGN Al15SQwvmMuprDy3CkKAPlGGK9oYnXj3UjE7CjZKAs8dYekOVJu46kjGJ6+hRJJF3EyS jZRLs0qIJ3s994no5pdqEWa1EIfAAt3T6sm54= MIME-Version: 1.0 Received: by 10.223.107.199 with SMTP id c7mr774528fap.31.1234372009115; Wed, 11 Feb 2009 09:06:49 -0800 (PST) In-Reply-To: References: Date: Wed, 11 Feb 2009 18:06:49 +0100 Message-ID: Subject: Re: Data Management export and import for 1.2.x -> 1.3.x ... do I really have to? From: Emmanuel Venisse To: users@continuum.apache.org Content-Type: multipart/alternative; boundary=001636c5b84d1fc1e40462a7a141 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5b84d1fc1e40462a7a141 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Feb 11, 2009 at 4:28 PM, Wendy Smoak wrote: > On Wed, Feb 11, 2009 at 6:00 AM, Emmanuel Venisse > wrote: > > The diff between Continuum-1.2.2 and 1.3.1 generated by liquibase (1.8.1) > is > > the following: > > Cool, can you share the command or process you used to produce this? To generate the changesets file: liquibase --driver=org.apache.derby.jdbc.EmbeddedDriver --url=jdbc:derby:[PATH_TO_NEW_CONTINUUM]/databases/continuum --username=sa diffChangeLog --baseUrl=jdbc:derby:[PATH_TO_OLD_CONTINUUM]/databases/continuum --baseUsername=sa >dbchanges.xml To generate the sql file: liquibase --driver=org.apache.derby.jdbc.EmbeddedDriver --url=jdbc:derby:[PATH_TO_NEW_CONTINUUM]/databases/continuum --username=sa --changeLogFile=dbchanges.xml updateSQL If you run it, you'll see it isn't exactly the one I sent because I remove lines used by liquibase to know what was the latest patch applied. If you run it directly on the DB without generate the SQL, you can use the following command: liquibase --driver=org.apache.derby.jdbc.EmbeddedDriver --url=jdbc:derby:[PATH_TO_NEW_CONTINUUM]/databases/continuum --username=sa --changeLogFile=dbchanges.xml update but it will add liquibase tables. I used liquibase 1.8.1 because the latest (1.9.0) failed with the diffChangeLog command but I'm not sure things done in 1.9.0 is important for us (http://blog.liquibase.org/2009/01/liquibase-190-released.html) > > > Maybe it can help you to understand db schema change. For a correct > update, > > I think we need to populate some table/column but it's a start. > > In a visual inspection of the schemaspy output for 1.2.2 and 1.3.1 the > other day, I identified these changes: > new table CONTINUUM_RELEASE_RESULT > new table SCHEDULE_BUILD_QUEUES > new table BUILD_QUEUE > new table PROJECT_SCM_ROOT > table PROJECT has new column SCM_RESULT_SCMRESULT_ID_OID > table PROJECT_NOTIFIER has new column SEND_ON_SCM_FAILURE > table SYSTEM_CONFIGURATION has new columns DISTRIBUTED_BUILD_ENABLED > and NUMBER_OF_BUILDS_IN_PARALLEL > > That seems to match up with what liquibase found, plus setting up the > foreign key relationships. I think I have a handle on *what* changed > from 1.2.3 to 1.3.1, what I don't understand is how much of this > change JDO can handle on its own. > > Why can't it add the NUMBER_OF_BUILDS_IN_PARALLEL column? Why does it > complain that there is no default value, when I see one in the model? I don't know, maybe a bug in JPOX > > > Another thing I wonder, when I compare the databases for the two > versions... the new columns appear in the *middle* of tables. Is it > okay to append new columns to the end of an existing table? That > seems to be what the liquibase sql is doing. The columns order isn't important. They appears in the middle only for a fresh db, right? If it isn't, I don't understand which sql command can be done to insert a column in the middle. Emmanuel --001636c5b84d1fc1e40462a7a141--