]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from MOODLE_15_STABLE: Since there was no pg support for enrol/authorize until...
authormjollnir_ <mjollnir_>
Sun, 26 Mar 2006 22:59:23 +0000 (22:59 +0000)
committermjollnir_ <mjollnir_>
Sun, 26 Mar 2006 22:59:23 +0000 (22:59 +0000)
enrol/authorize/db/postgres7.php

index ee4e4fd2a37e2f3f170c7a9ca316bf9f0a14decb..e206da11cfbeaa0d5c4d776299509d7c9cd9875c 100644 (file)
@@ -8,7 +8,11 @@ function enrol_authorize_upgrade($oldversion=0) {
 
     $result = true;
 
-    if ($oldversion == 0) { // First time install
+    if (!$tables = $db->MetaColumns($CFG->prefix . 'enrol_authorize')) {
+        $installfirst = true;
+    }
+
+    if ($oldversion == 0 || !empty($installfirst)) { // First time install
         $result = modify_database("$CFG->dirroot/enrol/authorize/db/postgres7.sql");
         return $result; // RETURN, sql file contains last upgrades.
     }