Overview
A database conversion is typically required between Sakai versions. Database conversion scripts - in distinct versions for MySQL and Oracle, respectively - are found in the reference/docs/conversion folder of the release or in our SVN repository:
In the same directory you'll also find conversion scripts for earlier Sakai versions. Migration from an earlier version will require the successive application of all intermediate scripts (see the following table). You cannot, for example, move from 2.2.1 to 2.4.0 by applying a single script. The were no database schema changes between 2.4.0 and 2.4.1, so you can migrate to the 2.5.0 schema from either version using the 2.4.0 scripts.
| Upgrade Step | Conversion script prefix |
|---|---|
| 1.5 to 2.0 | sakai_1_5-2_0 |
| 2.0 to 2.1 | sakai_2_0-2_1 |
| 2.1 to 2.1.1 | sakai_2_1-2_1_1 |
| 2.1.1 to 2.1.2 | sakai_2_1_1-2_1_2 |
| 2.1.2 to 2.2.0 | sakai_2_1_2-2_2_0 |
| 2.2.0 to 2.2.1 | sakai_2_2_0-2_2_1 |
| 2.2.1 to 2.3.2 |
sakai_2_2_1-2_3_1 |
| 2.3.0 to 2.3.2 |
sakai_2_3_0-2_3_1 |
| 2.3.1 to 2.3.2 | no schema changes |
| 2.3.2 to 2.4.1 |
sakai_2_3_1-2_4_0 |
| 2.4.0 to 2.4.1 | no schema changes |
| 2.4.1 to 2.5.0 | sakai_2_4_0-2_5_0 |
| 2.5.0 to 2.5.1 |
sakai_2_5_0-2_5_1 |
| 2.5.0 to 2.5.2 |
sakai_2_5_0-2_5_2 |
| 2.5.1 to 2.5.2 | no schema changes |
The latter version represents a security release that replaced one or more intervening Sakai releases. In this case the provided conversion script contains the necessary information to migrate you through the no longer available, intervening Sakai versions.
As a general rule, be sure to read through the conversion scripts before applying them. The conversion scripts are generic in the sense that they do not take into account any special customizations you may have made - such as new roles, or the deployment of additional tools or if you are migrating from 2.4.x - and they may complicate your migration with unintended consequences if you execute them blindly.
There were no schema changes between Sakai 2.5.1 and 2.5.2. The Sakai 2.5.1 and 2.5.2 releases are both based on 2.5.0; Sakai 2.5.1 containing a major portfolio tool bug that was reverted in Sakai 2.5.2.
Other Conversion
2.5 also includes data and schema conversion outside the standard scripts for Assignments and Content Hosting to address data integrity for assignments and performance enhancements in both tools. Below is a quick summary and overview of the process for each tool.
Assignments
The assignment service has permitted the creation of duplicate submission objects (i.e. 2 or more submissions for the same student and assignment). While the UI should prevent this from happening, at various stages in the evolution of the Assignments code, bugs, race conditions or other failures have led to duplicate objects being created. This conversion seeks to reconcile those duplicates and add database constraints to prevent this is the future.
In summary, the conversion script is necessary to
- Remove existing duplicate submission records, if any
- Prevent future submission duplicates by applying unique constraint on the ASSIGNMENT_SUBMISSION table
- Improve performance of the Assignment tool
The conversion script does the following to the existing ASSIGNMENT_SUBMISSION table in Sakai database:
- read in all tuples as AssignmentSubmission object, parse out data such as submitter_id, submit_time, submitted, and graded, and stores those attributes as separate columns in the ASSIGNMENT_SUBMISSION table;
- Runs though the table, combine and remove submission duplicates (tuples with same "context" and "submitter_id" combination);
- apply the unique constraint of "context" + "submitter_id" to ASSIGNMENT_SUBMISSION table.
There is a readme file with detailed instructions on this process at https://source.sakaiproject.org/svn/assignment/tags/sakai_2-5-0. In addition, there is further information in the related JIRA SAK-11821.
This conversion was a part of the post-2.4 assignments branch so those migrating from a version already running this can disregard this step.
Content Hosting
Moving from 2.4 to 2.5 requires adding several columns to the database tables used by the Content Hosting Service (the service used by the Resources tool, Dropbox, filepicker and WebDAV). The conversion scripts contain DDL statements to accomplish those changes. You need to run these conversions scripts (or perform the equivalent operations manually) and then convert your existing Resources via one of the methods outlined below, before you will gain the performance improvements Sakai 2.5 offers.
The new columns added to the database tables support a switch from XML serialization to "binary-entity" serialization, and enable Resources to perform faster and use less memory. One of the key areas this impacts is improving the performance of quota calculations.
There are two methods for converting existing Resources, with the first being the recommended option, as it enables all performance improvements when completed:
- Run the conversion utility, which can be run on a live system. (See readme for more details.)
Systems running oracle should read the email threads copied to the comments section below.
- Let the code convert each Resource as it is accessed.
This is only recommended for implementations with small datasets, such as pilot deployments; otherwise you should use the above conversion utility.
While some performance benefits from the binary-entity serialization can be realized immediately using this method, others, such as the quota calculation improvements will not be available until all Resources have been accessed and converted.
Based on the state of the data in the Content Hosting Service tables, it will start up in one of two modes:
- Binary only - If the code detects on start-up that all of the XML fields are null – as would be the case after running the conversion utility – it will run in binary mode. The means the system will only read and write using binary-entity serialization, and you will be able to fully realize all the performance enhancements that it offers.
- Dual mode - If the code detects there is still data in the XML fields – as would be the case if the conversion utility has not be run – it will run in dual mode. This means the system will be capable of reading both XML-serialized and binary-entity-serialized resources, but will write using only binary, and will convert any XML data it encounters into binary data. This gives you some of the performance benefits of binary-entity serialization without running the conversion utility, but you will never get the quota-calculation improvements unless all Resources end up converted.
| Need Further Help? For further information, please contact:
|
Discussion
The Discussion tool was retired and removed for Sakai 2.5. (Upgrade/Migration options...)
Comments (2)
Apr 11, 2008
Peter A. Knoop says:
Jim Eng's email to the sakaidev list, Mon 7Apr2008 10:14 PM, "Re: sakai25x : Con...Jim Eng's email to the sakai-dev list, Mon 7-Apr-2008 10:14 PM, "Re: sakai-2-5-x : Content Hosting Conversion"
Apr 11, 2008
Peter A. Knoop says:
Jim Eng's email to the sakaidev list, Mon 8Apr2008 5:21 PM, "Re: sakai25x : Cont...Jim Eng's email to the sakai-dev list, Mon 8-Apr-2008 5:21 PM, "Re: sakai-2-5-x : Content Hosting Conversion"