Permalink
Browse files

Since there was no pg support for enrol/authorize until later, the ve…

…rsioning was screwey in postgres, so check the table exists first before trying to add columns to it, create it if it is not there
  • Loading branch information...
1 parent 1e3787c commit b5c8bf7a26465bbc85ce735fde8a1998e394be72 mjollnir_ committed Mar 26, 2006
Showing with 5 additions and 1 deletion.
  1. +5 −1 enrol/authorize/db/postgres7.php
@@ -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");
}

0 comments on commit b5c8bf7

Please sign in to comment.