merging changes from MOODLE_16_STABLE

This commit is contained in:
skodak 2006-07-31 18:21:42 +00:00
parent a8ff58dd2c
commit bfc38bb2eb
2 changed files with 13 additions and 3 deletions

View File

@ -231,6 +231,13 @@ function scorm_upgrade($oldversion) {
if ($oldversion < 2006021401) {
table_column("scorm", "", "version", "VARCHAR", "9", "", "", "NOT NULL", "reference");
modify_database('', 'ALTER TABLE prefix_scorm ALTER COLUMN width SET DEFAULT 100');
modify_database('', 'ALTER TABLE prefix_scorm ALTER COLUMN height SET DEFAULT 500');
// there is an extra constraint key1, we should drop this
modify_database('', 'ALTER TABLE prefix_scorm_scoes_track DROP CONSTRAINT prefix_scorm_scoes_track_userid_key1');
modify_database('', 'ALTER TABLE prefix_scorm_scoes_track DROP CONSTRAINT prefix_scorm_scoes_track_userid_key');
modify_database('', 'ALTER TABLE prefix_scorm_scoes_track ADD CONSTRAINT prefix_scorm_scoes_track_userid_key UNIQUE (userid, scormid, scoid, attempt, element)');
}
return true;

View File

@ -147,9 +147,12 @@ function wiki_upgrade($oldversion) {
if ($oldversion < 2006042801) {
modify_database('', 'ALTER TABLE prefix_wiki_pages
ALTER COLUMN content SET DEFAULT \'\',
ALTER COLUMN refs SET DEFAULT \'\',
ALTER COLUMN content DROP NOT NULL,
ALTER COLUMN content SET DEFAULT \'\'');
modify_database('', 'ALTER TABLE prefix_wiki_pages
ALTER COLUMN refs SET DEFAULT \'\'');
modify_database('', 'ALTER TABLE prefix_wiki_pages
ALTER COLUMN content DROP NOT NULL');
modify_database('', 'ALTER TABLE prefix_wiki_pages
ALTER COLUMN refs DROP NOT NULL');
}