From ced7ca9ef911c42bb9628e74a312408b3ae2770c Mon Sep 17 00:00:00 2001 From: paca70 Date: Sun, 5 Sep 2004 11:26:19 +0000 Subject: [PATCH] Added latest changes to postgres files --- mod/exercise/db/postgres7.php | 6 ++++++ mod/exercise/db/postgres7.sql | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mod/exercise/db/postgres7.php b/mod/exercise/db/postgres7.php index 202a3ae87c..1fdbb5ec75 100644 --- a/mod/exercise/db/postgres7.php +++ b/mod/exercise/db/postgres7.php @@ -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; } diff --git a/mod/exercise/db/postgres7.sql b/mod/exercise/db/postgres7.sql index 7b402d0d71..387d8c23ad 100644 --- a/mod/exercise/db/postgres7.sql +++ b/mod/exercise/db/postgres7.sql @@ -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 '' + ); # -------------------------------------------------------- -- 2.39.5