execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report stats', 'course', 'fullname')");
}
}
+
+ //Renaming lastIP to lastip (all fields lowercase)
+ if ($oldversion < 2006060900) {
+ //Only if it exists
+ $fields = $db->MetaColumnNames($CFG->prefix.'user');
+ if (in_array('lastIP',$fields)) {
+ table_column("user", "lastIP", "lastip", "varchar", "15", "", "", "not null", "currentlogin");
+ }
+ }
return $result;
}
`lastaccess` int(10) unsigned NOT NULL default '0',
`lastlogin` int(10) unsigned NOT NULL default '0',
`currentlogin` int(10) unsigned NOT NULL default '0',
- `lastIP` varchar(15) NOT NULL default '',
+ `lastip` varchar(15) NOT NULL default '',
`secret` varchar(15) NOT NULL default '',
`picture` tinyint(1) NOT NULL default '0',
`url` varchar(255) NOT NULL default '',
}
}
+ //Renaming lastIP to lastip (all fields lowercase)
+ if ($oldversion < 2006060900) {
+ //Not needed unded PG because it stores fieldnames lowecase by default
+ //Only if it exists (because MOODLE_16_STABLE could have done this work before. Bug 5763)
+ //$fields = $db->MetaColumnNames($CFG->prefix.'user');
+ //if (in_array('lastIP',$fields)) {
+ // table_column("user", "lastIP", "lastip", "varchar", "15", "", "", "", "currentlogin");
+ //}
+ }
+
return $result;
}
lastaccess integer NOT NULL default '0',
lastlogin integer NOT NULL default '0',
currentlogin integer NOT NULL default '0',
- lastIP varchar(15) default NULL,
+ lastip varchar(15) default NULL,
secret varchar(15) default NULL,
picture integer default NULL,
url varchar(255) default NULL,
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2006060400; // YYYYMMDD = date
+ $version = 2006060900; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.7 dev'; // Human-friendly version name