Permalink
Browse files

SQL file contains all upgrades.

  • Loading branch information...
1 parent 5c8708e commit 594d381aa2c241ac8d7ae07102b069bc54279ade ethem committed Apr 26, 2006
Showing with 18 additions and 15 deletions.
  1. +4 −3 enrol/authorize/db/mysql.php
  2. +14 −12 enrol/authorize/db/mysql.sql
@@ -7,11 +7,12 @@ function authorize_upgrade($oldversion=0) {
$result = true;
-
if ($oldversion == 0) {
- modify_database("$CFG->dirroot/enrol/authorize/db/mysql.sql");
+ $result = modify_database("$CFG->dirroot/enrol/authorize/db/mysql.sql");
+ return $result; // SQL file contains all upgrades.
} else if (!in_array($CFG->prefix . 'enrol_authorize', $db->MetaTables('TABLES'))) {
- modify_database("$CFG->dirroot/enrol/authorize/db/mysql.sql");
+ $result = modify_database("$CFG->dirroot/enrol/authorize/db/mysql.sql");
+ return $result; // SQL file contains all upgrades.
}
if ($oldversion < 2005071601) {
@@ -1,12 +1,14 @@
-CREATE TABLE `prefix_enrol_authorize` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `cclastfour` int(11) default '0',
- `ccexp` varchar(6) default '',
- `cvv` varchar(4) default '',
- `ccname` varchar(255) default '',
- `courseid` int(11) NOT NULL default '0',
- `userid` int(11) NOT NULL default '0',
- `avscode` char(1) default 'P',
- `transid` varchar(255) default '',
- PRIMARY KEY (`id`)
-) TYPE=MyISAM COMMENT='Holds all known information about creditcard transactions';
+CREATE TABLE `prefix_enrol_authorize` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `cclastfour` int(4) unsigned NOT NULL default '0',
+ `ccexp` varchar(6) default '',
+ `cvv` varchar(4) default '',
+ `ccname` varchar(255) NOT NULL default '',
+ `courseid` int(10) unsigned NOT NULL default '0',
+ `userid` int(10) unsigned NOT NULL default '0',
+ `avscode` char(1) default 'P',
+ `transid` varchar(255) default '',
+ PRIMARY KEY (`id`),
+ KEY `courseid` (`courseid`),
+ KEY `userid` (`userid`)
+) TYPE=MyISAM COMMENT='Holds all known information about creditcard transactions';

0 comments on commit 594d381

Please sign in to comment.