From 1a5bc0467ffb322f3e56670b4caaea16b7e680b1 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 14 Dec 2004 06:41:18 +0000 Subject: [PATCH] Field added to groups table to allow group specific enrolment keys --- lib/db/mysql.php | 3 +++ lib/db/mysql.sql | 1 + lib/db/postgres7.php | 4 ++++ lib/db/postgres7.sql | 1 + version.php | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 8725f4fd60..7b9cd84814 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1009,6 +1009,9 @@ function main_upgrade($oldversion=0) { table_column('user', '', 'policyagreed', 'integer', '1', 'unsigned', '0', 'not null', 'confirmed'); } + if ($oldversion < 2004121400) { + table_column('groups', '', 'password', 'varchar', '50', '', '', 'not null', 'description'); + } return $result; diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index bf7326dd39..270c79e606 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -213,6 +213,7 @@ CREATE TABLE `prefix_groups` ( `courseid` int(10) unsigned NOT NULL default '0', `name` varchar(254) NOT NULL default '', `description` text NOT NULL, + `password` varchar(50) NOT NULL default '', `lang` varchar(10) NOT NULL default 'en', `picture` int(10) unsigned NOT NULL default '0', `hidepicture` int(2) unsigned NOT NULL default '0', diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index c552dfeb4d..2d1dd5ab0c 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -777,6 +777,10 @@ function main_upgrade($oldversion=0) { if ($oldversion < 2004112900) { table_column('user', '', 'policyagreed', 'integer', '1', 'unsigned', '0', 'not null', 'confirmed'); } + + if ($oldversion < 2004121400) { + table_column('groups', '', 'password', 'varchar', '50', '', '', 'not null', 'description'); + } return $result; } diff --git a/lib/db/postgres7.sql b/lib/db/postgres7.sql index 96f13a8b88..d5c862727f 100644 --- a/lib/db/postgres7.sql +++ b/lib/db/postgres7.sql @@ -121,6 +121,7 @@ CREATE TABLE prefix_groups ( courseid integer NOT NULL default '0', name varchar(255) NOT NULL default '', description text, + password varchar(50) NOT NULL default '', lang varchar(10) NOT NULL default '', picture integer NOT NULL default '0', hidepicture integer NOT NULL default '0', diff --git a/version.php b/version.php index 584af0fd69..5db01046e7 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2004112900; // YYYYMMDD = date of first major branch release 1.4 + $version = 2004121400; // YYYYMMDD = date of first major branch release 1.4 // XY = increments within a single day $release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name -- 2.39.5