Database Conversion Scripts (2.x and 10.x)

A database conversion is typically required in order to upgrade from one Sakai version to another. 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 will also find conversion scripts for earlier Sakai releases. 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.6.1 to 2.9.0 by applying a single script. You will need to run 6 or 7 scripts all in a row.

(warning) Note for oracle, some of the scripts will leave your indexes in an invalid state because of LONG->CLOB conversion. You will need to run this script to find the invalid/unusable indexes, THEN run the result of this script to alter these indexes.

select 'alter index '||index_name||' rebuild online;' from user_indexes where status = 'INVALID' or status = 'UNUSABLE'; 
-- Run the resulting SQL commands this script generates if any)

(warning) 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.

(minus) For conversions prior to 2.6 please see the 2.8 install guide. Conversions from much older are not very well supported or tested but should still work.



Upgrade Step

MySQL

Oracle

Notes

2.6.0

sakai_2_6_0_mysql_conversion.sql

sakai_2_6_0_oracle_conversion.sql

Use scripts updated in 2.6.x branch (r65964+). Include fixes for SAK-16751 - Getting issue details... STATUS , SAK-16753 - Getting issue details... STATUS and SAK-16809 - Getting issue details... STATUS . If you are upgrading from 2.5 please review SAK-15597 - Getting issue details... STATUS for an important property setting issue (not a database conversion issue).

2.6.0 to 2.6.x

sakai_2_6_0-2_6_x_mysql_conversion001_SAK-16668.sql

sakai_2_6_0-2_6_x_oracle_conversion001_SAK-16668.sql

SAK-16668 - Getting issue details... STATUS : if you upgraded to Sakai 2.6.0 PRIOR to 1 Sept 2009 you must run this conversion to update data types in ASN_MA_ITEM_T and ASN_NOTE_ITEM_T.

2.6.0 to 2.6.x

sakai_2_6_0-2_6_x_mysql_conversion002_SAK-16548.sql

sakai_2_6_0-2_6_x_oracle_conversion002_SAK-16548.sql

SAK-17219 - Getting issue details... STATUS , SAK-16548 - Getting issue details... STATUS : Matt Jones (UMich) reports that the original 2.6.0 to 2.6.1 conversion script for the assignment_content table "is inefficient, potentially locks tables and performs too many scans, especially if there are hundreds of thousands of rows." Matt has revised both the MySQL and Oracle conversion scripts to improve their performance.

2.6.0 to 2.6.x

sakai_2_6_0-2_6_x_mysql_conversion003_SAK-16847.sql

sakai_2_6_0-2_6_x_oracle_conversion003_SAK-16847.sql

SAK-16847 - Getting issue details... STATUS : adds asn.share.drafts to SAKAI_REALM_FUNCTION.

2.6.0 to 2.6.x

sakai_2_6_0-2_6_x_mysql_conversion004_SAK-10512.sql

sakai_2_6_0-2_6_x_oracle_conversion004_SAK-10512.sql

SAK-10512 - Getting issue details... STATUS : updates existing entries in SAKAI_PERSON_T setting the field locked to false if currently NULL.

2.6.0 to 2.6.1

sakai_2_6_0-2_6_1_mysql_conversion.sql

sakai_2_6_0-2_6_1_oracle_conversion.sql

Rollup of 2.6.0-2.6.x conversion scripts 001-004 above.

2.6.1 to 2.6.2



no schema changes

2.6.0 to 2.6.x

sakai_2_6_0-2_6_x_mysql_conversion005_SAK-14482.sql

sakai_2_6_0-2_6_x_oracle_conversion005_SAK-14482.sql

SAK-14482 - Getting issue details... STATUS : replace the "mercury" site's sakai.assignment tool (deprecated since 2.5.0) with the sakai.assignment.grades tool.

2.6.2-2.7.0

sakai_2_7_0_mysql_conversion.sql

sakai_2_7_0_oracle_conversion.sql


2.7.0-2.7.1

sakai_2_7_0-2_7_1_mysql_conversion.sql

sakai_2_7_0-2_7_1_oracle_conversion.sql


2.7.1-2.7.2

sakai_2_7_1-2_7_2_mysql_conversion.sql

sakai_2_7_1-2_7_2_oracle_conversion.sql


2.8.0

sakai_2_8_0_mysql_conversion.sql

sakai_2_8_0_oracle_conversion.sql

2.7.1 to 2.8.0 database conversion.

2.8.0

sakai_2_8_0_mysql_hbm_indexes.sql

sakai_2_8_0_oracle_hbm_indexes.sql

Starting up sakai-2.8.0 in order to populate an empty database (auto.ddl=true) can result in certain tools relying on Hibernate 3.2.7.ga to generate indexes to fail to do so. Check database and then run this script to add missing indexes.

2.8.1sakai_2_8_0-2_8_1_mysql_conversion.sqlsakai_2_8_0-2_8_1_oracle_conversion.sql
Conversion from 2.8.0 to 2.8.1 can result in lost mail messages. See SAK-21305 - Getting issue details... STATUS for details on how to fix.This should only affect cases for which 2.8.0 was actually RUN in production, not if 2.8.0 is just one step in your upgrade process.
2.8.2sakai_2_8_1-2_8_2_mysql_conversion.sqlsakai_2_8_1-2_8_2_oracle_conversion.sql
2.8.3sakai_2_8_2-2_8_3_mysql_conversion.sqlsakai_2_8_2-2_8_3_oracle_conversion.sql
2.9.0sakai_2_9_0_mysql_conversion.sqlsakai_2_9_0_oracle_conversion.sql
For languages other than English, Catalan and Spanish please see SAM-787 - Getting issue details... STATUS .
2.9.1

sakai_2_9_1_mysql_conversion.sql

sakai_2_9_1_oracle_conversion.sql



2.9.2

sakai_2_9_2_mysql.sql

LTI 2_1_0_mysql_conversion.sql


sakai_2_9_2_oracle.sql

LTI_2_1_0_oracle_conversion.sql


2.9.3

sakai_2_9_3_mysql.sql


sakai_2_9_3_oracle.sql
10.0sakai_10_mysql.sqlsakai_10_oracle.sqlPlease note, the Oracle conversion scripts should be taken from trunk at the moment, including for the conversion to 10.0 - Neal Caidin - 14-October-2014
10.1sakai_10_0-10_1_mysql_conversion.sqlsakai_10_0-10_1_oracle_conversion.sql
10.2no conversion needed for MySqlsakai_10_1-10_2_oracle_conversion.sql
10.3no conversion needed for MySqlsakai_10_2-10_3_oracle_conversion.sql
10.4no conversion needed for MySqlno conversion needed for Oracle
10.5sakai_10_1-10_5_mysql_conversion.sqlsakai_10_3-10_5_oracle_conversion.sql