diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 8725f4fd602..7b9cd848144 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 bf7326dd39b..270c79e6067 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 c552dfeb4d9..2d1dd5ab0c6 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 96f13a8b88e..d5c862727f8 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 584af0fd696..5db01046e7e 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