Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-28537 DB Fixed up use of the TYPE option when creating MySQL tabl…

…es, now uses ENGINE for bc and future support
  • Loading branch information...
commit 7a8115a92c2138b87d606f83f615a983350cda58 1 parent 4ae7426
@samhemelryk samhemelryk authored
View
2  auth/cas/auth.php
@@ -675,7 +675,7 @@ function sync_users ($bulk_insert_records = 1000, $do_updates = true) {
$droptablesql[] = 'DROP TEMPORARY TABLE ' . $temptable; // sql command to drop the table (because session scope could be a problem)
execute_sql_arr($droptablesql, true, false); /// Drop temp table to avoid persistence problems later
echo "Creating temp table $temptable\n";
- execute_sql('CREATE TEMPORARY TABLE ' . $temptable . ' (username VARCHAR(64), PRIMARY KEY (username)) TYPE=MyISAM', false);
+ execute_sql('CREATE TEMPORARY TABLE ' . $temptable . ' (username VARCHAR(64), PRIMARY KEY (username)) ENGINE=MyISAM', false);
break;
case 'postgres':
$temptable = $CFG->prefix . 'extuser';
View
2  auth/ldap/auth.php
@@ -563,7 +563,7 @@ function sync_users ($bulk_insert_records = 1000, $do_updates = true) {
switch (strtolower($CFG->dbfamily)) {
case 'mysql':
$droptablesql[] = 'DROP TEMPORARY TABLE ' . $temptable; // sql command to drop the table (because session scope could be a problem)
- $createtemptablesql = 'CREATE TEMPORARY TABLE ' . $temptable . ' (username VARCHAR(64), PRIMARY KEY (username)) TYPE=MyISAM';
+ $createtemptablesql = 'CREATE TEMPORARY TABLE ' . $temptable . ' (username VARCHAR(64), PRIMARY KEY (username)) ENGINE=MyISAM';
break;
case 'postgres':
$droptablesql[] = 'DROP TABLE ' . $temptable; // sql command to drop the table (because session scope could be a problem)
View
10 backup/db/mysql.php
@@ -66,7 +66,7 @@ function backup_upgrade($oldversion=0) {
`value` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
- ) TYPE=MyISAM COMMENT='To store backup configuration variables'");
+ ) ENGINE=MyISAM COMMENT='To store backup configuration variables'");
}
if ($oldversion < 2003120800 and $result) {
@@ -79,7 +79,7 @@ function backup_upgrade($oldversion=0) {
`nextstarttime` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `courseid` (`courseid`)
- ) TYPE=MyISAM COMMENT='To store every course backup status'");
+ ) ENGINE=MyISAM COMMENT='To store every course backup status'");
if ($result) {
$result = execute_sql("CREATE TABLE `{$CFG->prefix}backup_log` (
@@ -89,7 +89,7 @@ function backup_upgrade($oldversion=0) {
`laststarttime` int(10) unsigned NOT NULL default '0',
`info` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='To store every course backup log info'");
+ ) ENGINE=MyISAM COMMENT='To store every course backup log info'");
}
}
@@ -105,7 +105,7 @@ function backup_upgrade($oldversion=0) {
`new_id` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `{$CFG->prefix}backup_files_uk` (`backup_code`,`file_type`,`path`)
- ) TYPE=MyISAM COMMENT='To store and recode ids to user and course files.'");
+ ) ENGINE=MyISAM COMMENT='To store and recode ids to user and course files.'");
}
if ($result) {
$result = execute_sql("DROP TABLE {$CFG->prefix}backup_ids");
@@ -120,7 +120,7 @@ function backup_upgrade($oldversion=0) {
`info` mediumtext,
PRIMARY KEY (`id`),
UNIQUE KEY `{$CFG->prefix}backup_ids_uk` (`backup_code` ,`table_name`,`old_id`)
- ) TYPE=MyISAM COMMENT='To store and convert ids in backup/restore'");
+ ) ENGINE=MyISAM COMMENT='To store and convert ids in backup/restore'");
}
}
View
2  blocks/db/mysql.php
@@ -142,7 +142,7 @@ function blocks_upgrade($oldversion=0) {
`visible` tinyint(1) not null default '0',
`configdata` text not null default '',
PRIMARY KEY(`id`)
- ) TYPE=MyISAM;");
+ ) ENGINE=MyISAM;");
}
if ($oldversion < 2005090200) {
View
2  lang/en_utf8/help/install.html
@@ -266,7 +266,7 @@ <h3 class="sectionheading" id="admin">5. Go to the admin page to continue config
'1', teacher varchar(100) NOT NULL default 'Teacher', startdate int(10)
unsigned NOT NULL default '0', enddate int(10) unsigned NOT NULL default
'0', timemodified int(10) unsigned NOT NULL default '0', PRIMARY KEY (id))
- TYPE=MyISAM</p>
+ ENGINE=MyISAM</p>
<p class="success">SUCCESS</p>
</div>
<p>...and so on, followed by: <span class="success">Main databases set up
View
54 lib/db/mysql.php
@@ -254,7 +254,7 @@ function main_upgrade($oldversion=0) {
`userid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
- ) TYPE=MyISAM COMMENT='One record per course creator';");
+ ) ENGINE=MyISAM COMMENT='One record per course creator';");
}
if ($oldversion < 2003032602) {
// Redoing it because of no prefix last time
@@ -362,7 +362,7 @@ function main_upgrade($oldversion=0) {
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `courseuserid` (course,userid)
- ) TYPE=MyISAM COMMENT='Stores info about how to display the course'");
+ ) ENGINE=MyISAM COMMENT='Stores info about how to display the course'");
}
if ($oldversion < 2003050400) {
@@ -458,7 +458,7 @@ function main_upgrade($oldversion=0) {
`description` text NOT NULL,
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (id)
- ) TYPE=MyISAM COMMENT='Defines grading scales'");
+ ) ENGINE=MyISAM COMMENT='Defines grading scales'");
}
@@ -558,7 +558,7 @@ function main_upgrade($oldversion=0) {
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `courseid` (`courseid`)
- ) TYPE=MyISAM COMMENT='Each record is a group in a course.'; ");
+ ) ENGINE=MyISAM COMMENT='Each record is a group in a course.'; ");
modify_database("", "CREATE TABLE `prefix_groups_members` (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -567,7 +567,7 @@ function main_upgrade($oldversion=0) {
`timeadded` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `groupid` (`groupid`)
- ) TYPE=MyISAM COMMENT='Lists memberships of users in groups'; ");
+ ) ENGINE=MyISAM COMMENT='Lists memberships of users in groups'; ");
}
if ($oldversion < 2003121800) {
@@ -601,7 +601,7 @@ function main_upgrade($oldversion=0) {
UNIQUE KEY `id` (`id`),
KEY `courseid` (`courseid`),
KEY `userid` (`userid`)
- ) TYPE=MyISAM COMMENT='For everything with a time associated to it'; ");
+ ) ENGINE=MyISAM COMMENT='For everything with a time associated to it'; ");
}
if ($oldversion < 2004012800) {
@@ -613,7 +613,7 @@ function main_upgrade($oldversion=0) {
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `useridname` (userid,name)
- ) TYPE=MyISAM COMMENT='Allows modules to store arbitrary user preferences'; ");
+ ) ENGINE=MyISAM COMMENT='Allows modules to store arbitrary user preferences'; ");
}
if ($oldversion < 2004012900) {
@@ -637,7 +637,7 @@ function main_upgrade($oldversion=0) {
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `md5key` (`md5key`)
- ) TYPE=MyISAM COMMENT='For storing temporary copies of processed texts';");
+ ) ENGINE=MyISAM COMMENT='For storing temporary copies of processed texts';");
}
if ($oldversion < 2004021000) {
@@ -667,7 +667,7 @@ function main_upgrade($oldversion=0) {
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `filtermd5key` (filter,md5key)
- ) TYPE=MyISAM COMMENT='For keeping information about cached data';");
+ ) ENGINE=MyISAM COMMENT='For keeping information about cached data';");
}
if ($oldversion < 2004021500) {
@@ -865,7 +865,7 @@ function main_upgrade($oldversion=0) {
`data` text NOT null,
PRIMARY KEY (`sesskey`),
KEY (`expiry`)
- ) TYPE=MyISAM COMMENT='Optional database session storage, not used by default';");
+ ) ENGINE=MyISAM COMMENT='Optional database session storage, not used by default';");
}
if ($oldversion < 2004111500) { // Update any users/courses using wrongly-named lang pack
@@ -1043,7 +1043,7 @@ function main_upgrade($oldversion=0) {
PRIMARY KEY (`id`),
KEY `useridfrom` (`useridfrom`),
KEY `useridto` (`useridto`)
- ) TYPE=MyISAM COMMENT='Stores all unread messages';");
+ ) ENGINE=MyISAM COMMENT='Stores all unread messages';");
modify_database('',"CREATE TABLE `prefix_message_read` (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -1057,7 +1057,7 @@ function main_upgrade($oldversion=0) {
PRIMARY KEY (`id`),
KEY `useridfrom` (`useridfrom`),
KEY `useridto` (`useridto`)
- ) TYPE=MyISAM COMMENT='Stores all messages that have been read';");
+ ) ENGINE=MyISAM COMMENT='Stores all messages that have been read';");
modify_database('',"CREATE TABLE `prefix_message_contacts` (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -1066,7 +1066,7 @@ function main_upgrade($oldversion=0) {
`blocked` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `usercontact` (`userid`,`contactid`)
- ) TYPE=MyISAM COMMENT='Maintains lists of relationships between users';");
+ ) ENGINE=MyISAM COMMENT='Maintains lists of relationships between users';");
modify_database('', "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'write', 'user', 'CONCAT(firstname,\" \",lastname)'); ");
modify_database('', "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'read', 'user', 'CONCAT(firstname,\" \",lastname)'); ");
@@ -1243,7 +1243,7 @@ function main_upgrade($oldversion=0) {
`std_skipweeks` tinyint(3) NOT NULL default '0',
`std_time` varchar(5) NOT NULL default '00:00',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='Rules for calculating local wall clock time for users';");
+ ) ENGINE=MyISAM COMMENT='Rules for calculating local wall clock time for users';");
}
if ($oldversion < 2005032800) {
@@ -1257,7 +1257,7 @@ function main_upgrade($oldversion=0) {
`weight` decimal(4,2) NOT NULL default '0.00',
PRIMARY KEY (`id`),
KEY `courseid` (`courseid`)
- ) TYPE=MyISAM ;");
+ ) ENGINE=MyISAM ;");
execute_sql("CREATE TABLE `{$CFG->prefix}grade_exceptions` (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -1266,7 +1266,7 @@ function main_upgrade($oldversion=0) {
`userid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `courseid` (`courseid`)
- ) TYPE=MyISAM ;");
+ ) ENGINE=MyISAM ;");
execute_sql("CREATE TABLE `{$CFG->prefix}grade_item` (
@@ -1280,7 +1280,7 @@ function main_upgrade($oldversion=0) {
`sort_order` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `courseid` (`courseid`)
- ) TYPE=MyISAM ;");
+ ) ENGINE=MyISAM ;");
execute_sql("CREATE TABLE `{$CFG->prefix}grade_letter` (
@@ -1291,7 +1291,7 @@ function main_upgrade($oldversion=0) {
`grade_low` decimal(4,2) NOT NULL default '0.00',
PRIMARY KEY (`id`),
KEY `courseid` (`courseid`)
- ) TYPE=MyISAM ;");
+ ) ENGINE=MyISAM ;");
execute_sql("CREATE TABLE `{$CFG->prefix}grade_preferences` (
@@ -1301,7 +1301,7 @@ function main_upgrade($oldversion=0) {
`value` int(10) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `courseidpreference` (`courseid`,`preference`)
- ) TYPE=MyISAM ;");
+ ) ENGINE=MyISAM ;");
}
@@ -1372,7 +1372,7 @@ function main_upgrade($oldversion=0) {
`value` text NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `plugin_name` (`plugin`, `name`)
- ) TYPE=MyISAM
+ ) ENGINE=MyISAM
COMMENT='Moodle modules and plugins configuration variables';");
}
@@ -1493,7 +1493,7 @@ function main_upgrade($oldversion=0) {
`requester` int(10) NOT NULL default 0,
PRIMARY KEY (`id`),
KEY `shortname` (`shortname`)
- ) TYPE=MyISAM;");
+ ) ENGINE=MyISAM;");
table_column('course','','requested');
}
@@ -1506,7 +1506,7 @@ function main_upgrade($oldversion=0) {
PRIMARY KEY (`id`),
KEY `course` (`course`),
KEY `module` (`module`)
- ) TYPE=MyISAM;");
+ ) ENGINE=MyISAM;");
table_column('course','','restrictmodules','int','1','','0','not null');
}
@@ -1692,7 +1692,7 @@ function main_upgrade($oldversion=0) {
UNIQUE KEY `id_user_idx` (`id`, `userid`),
KEY `post_lastmodified_idx` (`lastmodified`),
KEY `post_subject_idx` (`subject`)
- ) TYPE=MyISAM COMMENT='New moodle post table. Holds data posts such as forum entries or blog entries.';");
+ ) ENGINE=MyISAM COMMENT='New moodle post table. Holds data posts such as forum entries or blog entries.';");
modify_database("","CREATE TABLE prefix_tags (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -1700,7 +1700,7 @@ function main_upgrade($oldversion=0) {
`userid` int(10) unsigned NOT NULL default'0',
`text` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT ='tags structure for moodle.';");
+ ) ENGINE=MyISAM COMMENT ='tags structure for moodle.';");
modify_database("","CREATE TABLE prefix_blog_tag_instance (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -1710,7 +1710,7 @@ function main_upgrade($oldversion=0) {
`courseid` int(10) unsigned NOT NULL default'0',
`userid` int(10) unsigned NOT NULL default'0',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT ='tag instance for blogs.';");
+ ) ENGINE=MyISAM COMMENT ='tag instance for blogs.';");
}
if ($oldversion < 2006031400) {
@@ -1799,7 +1799,7 @@ function main_upgrade($oldversion=0) {
`mtable` varchar(30),
`field` varchar(50),
PRIMARY KEY (`id`)
- ) TYPE=MyISAM");
+ ) ENGINE=MyISAM");
// Add index to ensure that module and action combination is unique.
modify_database('', "ALTER TABLE prefix_log_display ADD UNIQUE `moduleaction`(`module` , `action`)");
@@ -2193,7 +2193,7 @@ function main_upgrade($oldversion=0) {
KEY `courseid` (`courseid`),
UNIQUE KEY `userid-courseid` (`userid`, `courseid`),
PRIMARY KEY (`id`)
- )TYPE=MYISAM COMMENT ='time user last accessed any page in a course';", true);
+ )ENGINE=MyISAM COMMENT ='time user last accessed any page in a course';", true);
}
if (!empty($CFG->rolesactive) and $oldversion < 2006091212) { // Reload the guest roles completely with new defaults
View
2  mod/choice/db/mysql.php
@@ -70,7 +70,7 @@ function choice_upgrade($oldversion) {
PRIMARY KEY (id),
UNIQUE KEY id (id),
KEY choiceid (choiceid)
- ) TYPE=MyISAM;")) {
+ ) ENGINE=MyISAM;")) {
table_column('choice_answers', 'choice', 'choiceid', 'integer', '10', 'unsigned', 0, 'not null');
table_column('choice_answers', 'answer', 'optionid', 'integer', '10', 'unsigned', 0, 'not null');
View
2  mod/forum/db/mysql.php
@@ -129,7 +129,7 @@ function forum_upgrade($oldversion) {
PRIMARY KEY (`id`),
KEY `user` (userid),
KEY `post` (postid)
- ) TYPE=MyISAM COMMENT='For keeping track of posts that will be mailed in digest form';");
+ ) ENGINE=MyISAM COMMENT='For keeping track of posts that will be mailed in digest form';");
}
if ($oldversion < 2004070700) { // This may be redoing it from STABLE but that's OK
View
12 mod/glossary/db/mysql.php
@@ -45,13 +45,13 @@ function glossary_upgrade($oldversion) {
`glossaryid` INT(10) UNSIGNED NOT NULL default '0',
`name` VARCHAR(255) NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='all categories for glossary entries'");
+ ) ENGINE=MyISAM COMMENT='all categories for glossary entries'");
execute_sql("CREATE TABLE `{$CFG->prefix}glossary_entries_categories` (
`categoryid` INT(10) UNSIGNED NOT NULL default '1',
`entryid` INT(10) UNSIGNED NOT NULL default '0',
PRIMARY KEY (`categoryid`, `entryid`)
- ) TYPE=MyISAM COMMENT='categories of each glossary entry'");
+ ) ENGINE=MyISAM COMMENT='categories of each glossary entry'");
}
if ( $oldversion < 2003092100 ) {
@@ -87,7 +87,7 @@ function glossary_upgrade($oldversion) {
`timemodified` INT(10) UNSIGNED NOT NULL default '0',
`format` TINYINT(2) UNSIGNED NOT NULL default '0',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='comments on glossary entries'");
+ ) ENGINE=MyISAM COMMENT='comments on glossary entries'");
execute_sql(" INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('glossary', 'add comment', 'glossary', 'name') ");
execute_sql(" INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('glossary', 'update comment', 'glossary', 'name') ");
@@ -166,7 +166,7 @@ function glossary_upgrade($oldversion) {
`entryid` INT(10) UNSIGNED NOT NULL default '0',
`alias` TEXT NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='entries alias'");
+ ) ENGINE=MyISAM COMMENT='entries alias'");
}
if ( $oldversion < 2003111500 ) {
@@ -190,7 +190,7 @@ function glossary_upgrade($oldversion) {
`sortkey` VARCHAR(50) NOT NULL default '',
`sortorder` VARCHAR(50) NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='Setting of the display formats'");
+ ) ENGINE=MyISAM COMMENT='Setting of the display formats'");
// Default format
execute_sql(" INSERT INTO {$CFG->prefix}glossary_displayformats
@@ -292,7 +292,7 @@ function glossary_upgrade($oldversion) {
`sortkey` VARCHAR(50) NOT NULL default '',
`sortorder` VARCHAR(50) NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='Setting of the display formats'");
+ ) ENGINE=MyISAM COMMENT='Setting of the display formats'");
//Define current 0-6 format names
$formatnames = array('dictionary','continuous','fullwithauthor','encyclopedia',
View
36 mod/quiz/db/mysql.php
@@ -110,7 +110,7 @@ function quiz_upgrade($oldversion) {
`max` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `answer` (`answer`)
- ) TYPE=MyISAM COMMENT='Options for numerical questions'; ");
+ ) ENGINE=MyISAM COMMENT='Options for numerical questions'; ");
}
if ($success && $oldversion < 2003072400) {
@@ -127,7 +127,7 @@ function quiz_upgrade($oldversion) {
`norm` int(10) unsigned NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `question` (`question`)
- ) TYPE=MyISAM COMMENT='Options for multianswer questions'; ");
+ ) ENGINE=MyISAM COMMENT='Options for multianswer questions'; ");
}
if ($success && $oldversion < 2003080301) {
@@ -224,7 +224,7 @@ function quiz_upgrade($oldversion) {
`multiplier` decimal(40,20) NOT NULL default '1.00000000000000000000',
`unit` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='Optional unit options for numerical questions'; ");
+ ) ENGINE=MyISAM COMMENT='Optional unit options for numerical questions'; ");
// Four tables for handling distribution and storage of
// individual data for dataset dependent question types
@@ -235,7 +235,7 @@ function quiz_upgrade($oldversion) {
`datasetnumber` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `category` (`category`,`userid`)
- ) TYPE=MyISAM COMMENT='Dataset number for attemptonlast attempts per user'; ");
+ ) ENGINE=MyISAM COMMENT='Dataset number for attemptonlast attempts per user'; ");
$success = $success && modify_database ("", " CREATE TABLE `prefix_quiz_dataset_definitions` (
`id` int(10) unsigned NOT NULL auto_increment,
`category` int(10) unsigned NOT NULL default '0',
@@ -244,7 +244,7 @@ function quiz_upgrade($oldversion) {
`options` varchar(255) NOT NULL default '',
`itemcount` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='Organises and stores properties for dataset items'; ");
+ ) ENGINE=MyISAM COMMENT='Organises and stores properties for dataset items'; ");
$success = $success && modify_database ("", " CREATE TABLE `prefix_quiz_dataset_items` (
`id` int(10) unsigned NOT NULL auto_increment,
`definition` int(10) unsigned NOT NULL default '0',
@@ -252,14 +252,14 @@ function quiz_upgrade($oldversion) {
`value` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `definition` (`definition`)
- ) TYPE=MyISAM COMMENT='Individual dataset items'; ");
+ ) ENGINE=MyISAM COMMENT='Individual dataset items'; ");
$success = $success && modify_database ("", " CREATE TABLE `prefix_quiz_question_datasets` (
`id` int(10) unsigned NOT NULL auto_increment,
`question` int(10) unsigned NOT NULL default '0',
`datasetdefinition` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `question` (`question`,`datasetdefinition`)
- ) TYPE=MyISAM COMMENT='Many-many relation between questions and dataset definitions'; ");
+ ) ENGINE=MyISAM COMMENT='Many-many relation between questions and dataset definitions'; ");
// One table for new question type calculated
// - the first dataset dependent question type
@@ -272,7 +272,7 @@ function quiz_upgrade($oldversion) {
`correctanswerlength` int(10) NOT NULL default '2',
PRIMARY KEY (`id`),
KEY `question` (`question`)
- ) TYPE=MyISAM COMMENT='Options for questions of type calculated'; ");
+ ) ENGINE=MyISAM COMMENT='Options for questions of type calculated'; ");
}
if ($success && $oldversion < 2004111400) {
@@ -333,7 +333,7 @@ function quiz_upgrade($oldversion) {
`userid` int(10) unsigned NOT NULL default '0',
`timestamp` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='The mapping between old and new versions of a question';");
+ ) ENGINE=MyISAM COMMENT='The mapping between old and new versions of a question';");
}
if ($success && $oldversion < 2005032000) {
@@ -471,7 +471,7 @@ function quiz_upgrade($oldversion) {
`sumpenalty` varchar(10) NOT NULL default '0.0',
PRIMARY KEY (`id`),
UNIQUE KEY `attemptid` (`attemptid`,`questionid`)
- ) TYPE=MyISAM COMMENT='Gives ids of the newest open and newest graded states';");
+ ) ENGINE=MyISAM COMMENT='Gives ids of the newest open and newest graded states';");
/// Now upgrade some fields in states and newest_states tables where necessary
// to save time on large sites only do this for attempts that have not yet been finished.
@@ -525,7 +525,7 @@ function quiz_upgrade($oldversion) {
`maxscore` int(10) unsigned NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `question` (`question`)
- ) TYPE=MyISAM COMMENT='Options for RQP questions';");
+ ) ENGINE=MyISAM COMMENT='Options for RQP questions';");
$success = $success && modify_database ('', "CREATE TABLE `prefix_quiz_rqp_type` (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -535,7 +535,7 @@ function quiz_upgrade($oldversion) {
`flags` tinyint(3) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
- ) TYPE=MyISAM COMMENT='RQP question types and the servers to be used to process them';");
+ ) ENGINE=MyISAM COMMENT='RQP question types and the servers to be used to process them';");
$success = $success && modify_database ('', "CREATE TABLE `prefix_quiz_rqp_states` (
`id` int(10) unsigned NOT NULL auto_increment,
@@ -544,7 +544,7 @@ function quiz_upgrade($oldversion) {
`persistent_data` text NOT NULL default '',
`template_vars` text NOT NULL default '',
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='RQP question type specific state information';");
+ ) ENGINE=MyISAM COMMENT='RQP question type specific state information';");
}
if ($success && $oldversion < 2005050300) {
@@ -568,7 +568,7 @@ function quiz_upgrade($oldversion) {
can_render tinyint(2) unsigned NOT NULL default '0',
can_author tinyint(2) unsigned NOT NULL default '0',
PRIMARY KEY (id)
- ) TYPE=MyISAM COMMENT='Information about RQP servers';");
+ ) ENGINE=MyISAM COMMENT='Information about RQP servers';");
if ($types = get_records('quiz_rqp_types')) {
foreach($types as $type) {
$server = new stdClass;
@@ -859,7 +859,7 @@ function quiz_upgrade($oldversion) {
`answer` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `question` (`question`)
- ) TYPE=MyISAM COMMENT='Options for essay questions'");
+ ) ENGINE=MyISAM COMMENT='Options for essay questions'");
$success = $success && modify_database ('', "
CREATE TABLE `prefix_quiz_essay_states` (
@@ -869,7 +869,7 @@ function quiz_upgrade($oldversion) {
`fraction` varchar(10) NOT NULL default '0.0',
`response` text NOT NULL,
PRIMARY KEY (`id`)
- ) TYPE=MyISAM COMMENT='essay question type specific state information'");
+ ) ENGINE=MyISAM COMMENT='essay question type specific state information'");
}
if ($success && $oldversion < 2005070202) {
@@ -1058,7 +1058,7 @@ function quiz_upgrade($oldversion) {
id int(10) unsigned NOT NULL auto_increment,
modulename varchar(20) NOT NULL default 'quiz',
PRIMARY KEY (id)
- ) TYPE=MyISAM COMMENT='Student attempts. This table gets extended by the modules';");
+ ) ENGINE=MyISAM COMMENT='Student attempts. This table gets extended by the modules';");
// create one entry for all the existing quiz attempts
$success = $success && modify_database ("", "INSERT INTO prefix_question_attempts (id)
SELECT uniqueid
@@ -1134,7 +1134,7 @@ function quiz_upgrade($oldversion) {
maxgrade double NOT NULL default '0',
PRIMARY KEY (id),
KEY quizid (quizid)
- ) TYPE=MyISAM COMMENT='Feedback given to students based on their overall score on the test';
+ ) ENGINE=MyISAM COMMENT='Feedback given to students based on their overall score on the test';
");
$success = $success && execute_sql("
View
2  mod/scorm/db/mysql.php
@@ -73,7 +73,7 @@ function scorm_upgrade($oldversion) {
UNIQUE (userid, scormid, scoid, element),
KEY userdata (userid, scormid, scoid),
KEY id (id)
- ) TYPE=MyISAM;",false);
+ ) ENGINE=MyISAM;",false);
$oldtrackingdata = get_records_select("scorm_sco_users","1","id ASC");
$oldelements = array ('cmi_core_lesson_location',
View
2  mod/wiki/db/mysql.php
@@ -139,7 +139,7 @@ function wiki_upgrade($oldversion) {
`wiki` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `wiki_pages_uk` (`pagename`,`version`,`wiki`))
- TYPE=MyISAM COMMENT='Holds the Wiki-Pages';");
+ ENGINE=MyISAM COMMENT='Holds the Wiki-Pages';");
if (!empty($insertafter)) {
execute_sql("INSERT INTO {$CFG->prefix}wiki_pages (pagename, version, flags, content,
Please sign in to comment.
Something went wrong with that request. Please try again.