Added some indexes for speed.

This commit is contained in:
ethem
2005-07-16 11:37:39 +00:00
parent 2015f84104
commit 60ede40d86
3 changed files with 12 additions and 2 deletions
+10
View File
@@ -26,6 +26,16 @@ function authorize_upgrade($oldversion=0) {
$curcode = empty($CFG->enrol_currency) ? 'USD' : $CFG->enrol_currency;
$objcur = get_record("currencies", "code", $curcode);
table_column('course', '', 'currency', 'integer', '10', 'unsigned', $objcur->id, 'not null', 'cost');
}
if ($oldversion < 2005071600) {
// Be sure, only last 4 digit is inserted.
table_column('enrol_authorize', 'cclastfour', 'cclastfour', 'integer', '4', 'unsigned', '0', 'not null');
table_column('enrol_authorize', 'courseid', 'courseid', 'integer', '10', 'unsigned', '0', 'not null');
table_column('enrol_authorize', 'userid ', 'userid ', 'integer', '10', 'unsigned', '0', 'not null');
// Add some indexes for speed.
execute_sql(" ALTER TABLE `{$CFG->prefix}enrol_authorize` ADD INDEX courseid(courseid) ");
execute_sql(" ALTER TABLE `{$CFG->prefix}enrol_authorize` ADD INDEX userid(userid) ");
}
return $result;
+1 -1
View File
@@ -9,4 +9,4 @@ CREATE TABLE `prefix_enrol_authorize` (
`avscode` char(1) default 'P',
`transid` varchar(255) default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Holds all known information about creditcard transactions';
) TYPE=MyISAM COMMENT='Holds all known information about authorize.net transactions';
+1 -1
View File
@@ -1,6 +1,6 @@
<?PHP // $Id$
$module->version = 2005071400;
$module->version = 2005071600;
$module->requires = 2004081800;
?>