[kforge-dev] upgrading from 0.9.0 to 0.9.1

Rufus Pollock rufus.pollock at okfn.org
Tue Feb 14 12:12:10 UTC 2006


We will need to write an upgrade script to move from 0.9.0 to 0.9.1 due 
to changes in acess control system. We have a couple of options:

1. Create a dump and reload process for data

2. Use some straight SQL to get rid of/alter conflicting parts of db and 
then leave the persistence layer to automagically create the new stuff

The first option might prove more long-lasting but will require more 
work. In an effort to summarize what is necessary I have produced the 
following rough sketch (more along the lines of the second version):

Upgrading summary:
   * backup
   * rename Guest role to Visitor
   * rename guest to visitor
   * check for duplicate service names and rename if there are
   * run stuff from initialize
     * this will auto create required tables (I hope)
     * auto create required data

Changes to DB
=============

DROP TABLE role_permission;
DROP TABLE permission;
DROP TABLE protection_object;
DROP TABLE permission_type;

ALTER TABLE person ADD COLUMN role_id integer;
ALTER TABLE person ADD CONSTRAINT role_id_exists FOREIGN KEY (role_id) 
REFERENCES role (id);

UPDATE role SET name = 'Visitor' where name = 'Guest';
DELETE FROM role where name = 'SystemAdministrator' OR name = 'SystemGuest';
UPDATE person SET name = 'visitor' where name = 'guest';
UPDATE person SET role_id = 4;
UPDATE person SET role_id = 1; where name = 'admin';

Next step
=========

Next step would be to boot up the new 0.9.1 kforge code which would 
create all the access control stuff and then run parts (not all) of the 
command/initialize.py

Regards,

Rufus




More information about the kforge-dev mailing list