]> git.mjollnir.org Git - moodle.git/commitdiff
Added latest changes to postgres files
authorpaca70 <paca70>
Sun, 5 Sep 2004 11:26:19 +0000 (11:26 +0000)
committerpaca70 <paca70>
Sun, 5 Sep 2004 11:26:19 +0000 (11:26 +0000)
mod/exercise/db/postgres7.php
mod/exercise/db/postgres7.sql

index 202a3ae87ca49471502377c1267bd2bacdb21afa..1fdbb5ec75962b90bbfc8a66de99f25f13988a92 100644 (file)
@@ -15,6 +15,12 @@ function exercise_upgrade($oldversion) {
                table_column("exercise", "", "assessmentcomps", "INTEGER", "4", "UNSIGNED", "2", "NOT NULL", "usemaximum");
     }
 
+    if ($oldversion < 2004090200) {
+        table_column("exercise", "", "usepassword", "INTEGER", "4", "UNSIGNED", "0", "NOT NULL");
+        table_column("exercise", "", "password", "VARCHAR", "32", "", "", "NOT NULL");
+    }
+
+
     return true;
 }
 
index 7b402d0d71bb9268b694746dc392e105df8d44b2..387d8c23add509fae58539f4ede3f6cbe4921aae 100644 (file)
@@ -17,7 +17,10 @@ CREATE TABLE prefix_exercise (
   timemodified INT8  NOT NULL default '0',
   grade INT NOT NULL default '0',
   gradinggrade INT  NOT NULL default '0',
-  showleaguetable INT  NOT NULL default '0'
+  showleaguetable INT  NOT NULL default '0',
+  usepassword INT4 NOT NULL default '0',
+  password VARCHAR(32) NOT NULL default ''
+
 );
 # --------------------------------------------------------