Sakai 1.5.1

Upgrading from 1.0.0

Sakai

Sakai Installation

Sakai Download

Sakai Documentation

Developing with Sakai

Upgrading from Sakai version 1.0.0 to version 1.5.1

The following process will update a Sakai 1.0.0 installation to a Sakai 1.5.1 installation. This is only necessary if you wish to move data from a previous Sakai 1.0.0 installation.

1. Backup
Backup your 1.0.0 database, Tomcat, and Sakai settings (/usr/local/sakai). You can backup a Oracle database using the exp command-line utility. You can backup your MySQL database using the the mysqldump command-line utility.
2. Install Sakai 1.5.1
Install and test a brand-new Sakai 1.5.1, preferably inside a fresh new Tomcat instance (following the the Sakai 1.5.1 installation instructions)
3. Update database schema
Execute the following SQL against the Oracle database to update the database schema:
	-- New tables 
	@sakai_realm.sql;
	@sakai_realm_populate.sql;
	@sakai_site.sql;
	@sakai_site_populate.sql;
	
	-- Allow for new content-in-filesystem option (in ContentHostingService)
	ALTER TABLE CONTENT_RESOURCE ADD (FILE_PATH VARCHAR2(128));
	
	-- Discussion service - change unique index to primary key 
	-- so that the foreign key constraint is accepted by Oracle
	DROP INDEX DISCUSSION_CHANNEL_INDEX;
	
	ALTER TABLE DISCUSSION_CHANNEL
	       ADD  ( PRIMARY KEY (CHANNEL_ID) ) ;
	       
	ALTER TABLE DISCUSSION_MESSAGE
	       ADD  ( FOREIGN KEY (CHANNEL_ID)
	                             REFERENCES DISCUSSION_CHANNEL
	                             ON DELETE SET NULL ) ;
	
Or for a MySQL database:
	-- New tables 
	source sakai_realm.sql;
	source sakai_realm_populate.sql;
	source sakai_site.sql;
	source sakai_site_populate.sql;
	
	-- Allow for new content-in-filesystem option (in ContentHostingService)
	ALTER TABLE CONTENT_RESOURCE ADD (FILE_PATH VARCHAR(128));
	
3. Convert data
In the file /usr/local/sakai/legacy-component/components.xml, enable: convertPubView for the AnnouncementService and convertOld for the RealmService and convertOld for the SiteService by uncommenting these properties.
4. Test updated Sakai
Startup Sakai 1.5.1 with the converted database and test that the conversion happened successfully.
5. Turn off data conversion
Turn off Announcement, Realm, and Site conversion In the file /usr/local/sakai/legacy-component/components.xml, remove convertPubView for the AnnouncementService and convertOld for the RealmService and convertOld for the SiteService.
6. Drop old database tables
Run the following two statements after you are sure that the conversion has happened properly.
    DROP TABLE CHEF_REALM;
    DROP TABLE CHEF_SITE;
    DELETE FROM SAKAI_REALM WHERE REALM_ID LIKE '/announcement/msg/%';
    
  • Oracle - You may need to turn off foreign key constraint checking to perform the deletes. It is safe to leave the obsolete data alone instead of deleting it (as long as you have performed all the other conversion steps).
  • MySQL - Sakai 1.0.0 used the LONG datatype (which maps to MEDIUMTEXT in MySQL). Sakai 1.5 uses the LONGTEXT datatype. This is a difference, but not an important one. You may safely ignore this difference.