/* give the root categoryId for the project template a more conformant name */
update SYSPARAMETERS
   set NAME = 'TemplatesRootCategoryId'
where SYSPARAMETERID = 48;

/* new parameter */
insert into SYSPARAMETERS
            (SYSPARAMETERID, CONTEXT, NAME, VALUESTRING, DESCRIPTION, ALLOWNULL, READONLY, HIDE, DATATYPE)
     values (49, 'PROJECTMANAGEMENT', 'ManagementViewRootCategoryId', '0', 'ID of the root category for managementview', 0, 0, 0, 1);

/* let the user start with a given category after login */
alter table USERS 
        add STARTCATEGORYID INTEGER;

/* update admin's start root category by default to the root category */
update USERS
   set STARTCATEGORYID = 1
 where USERID = 1;

update SYSPARAMETERS set VALUESTRING = '66' where CONTEXT = 'SYSTEMINFO' and name = 'DBVersionLow';
update SYSPARAMETERS set VALUESTRING = '2004-03-29' where CONTEXT = 'SYSTEMINFO' and name = 'DBCreationDate';
commit;
