Since there was no pg support for enrol/authorize until later, the versioning was screwey in postgres, so check the table exists first before trying to add columns to it, create it if it is not there

This commit is contained in:
mjollnir_
2006-03-26 22:57:42 +00:00
parent 1e3787c407
commit b5c8bf7a26
+5 -1
View File
@@ -7,7 +7,11 @@ function authorize_upgrade($oldversion=0) {
$result = true;
if ($oldversion == 0) {
if (!$tables = $db->MetaColumns($CFG->prefix . 'enrol_authorize')) {
$installfirst = true;
}
if ($oldversion == 0 || !empty($installfirst)) {
modify_database("$CFG->dirroot/enrol/authorize/db/postgres7.sql");
}