continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse McConnell" <jesse.mcconn...@gmail.com>
Subject Re: brief notes: upgrading 1.1-beta-1 to 1.1-beta-2
Date Thu, 30 Aug 2007 01:21:27 GMT
And this is what I did...

I pulled the database someplace that I could run squirrelsql and ran the
following sql statements to update the database, then I put the database
back into place and started the updated version.

------

ALTER TABLE INSTALLATION ADD installation_id integer not null default 0;

ALTER TABLE PROFILE_ENVIRONMENTVARIABLES ADD installation_id_eid integer;

alter table profiles add builder_installation_id_oid integer;

alter table profiles add jdk_installation_id_oid integer;

alter table projectdependency add modified_dependencies_id_own integer;

alter table projectdependency add modified_dependencies_integer_idx integer;


alter table profile_environmentvariables drop foreign key
profile_envi2v_fk2;

alter table profile_environmentvariables drop foreign key
profile_envi2v_fk1;

alter table profiles drop foreign key profiles_fk1;

alter table profiles drop foreign key profiles_fk2;

alter table installation drop primary key;

alter table installation add primary key (installation_id);

alter table profiles add CONSTRAINT profiles_fk1 foreign key
(builder_installation_id_oid) references installation (installation_id);

alter table profiles add CONSTRAINT profiles_fk2 foreign key
(jdk_installation_id_oid) references installation (installation_id);

alter table profile_environmentvariables add CONSTRAINT profile_envi2v_fk2
foreign key (installation_id_eid) references installation (installation_id);


alter table profile_environmentvariables add CONSTRAINT profile_envi2v_fk1
foreign key (id_oid) references profiles (id);


---

cheers!

jesse


On 8/17/07, Brett Porter <brett@apache.org> wrote:
>
> Here's what I did (this is a once off thing, though we really need to
> make sure changes are backwards compatible and can handle missing
> metadata in the future...)
>
> - run data-management from 1.1-beta-1 to export the build database (I
> had to build this from source)
> - edit the exported builds.xml to add <installationId>1</
> installationId> to each installation (using sequential numbers)
> - change name="..." to installationId="..." in each profile by
> replacing the name with the corresponding installation ID
> - comment out the environmentVariables profile since it would cause a
> duplicate PK (maybe a bug in the data management)
> - import the database again using data management from 1.1-beta-2.
>
> In case anyone needs it :)
>
> Cheers,
> Brett
>



-- 
jesse mcconnell
jesse.mcconnell@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message