diff --git a/lib/db/mysql.php b/lib/db/mysql.php index fdf1ad1e43e..ad48660d74a 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1473,6 +1473,11 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2005072000) { // Add a couple fields to mdl_event to work towards iCal import/export + table_column('event', '', 'uuid', 'char', '36', '', '', 'not null', 'visible'); + table_column('event', '', 'sequence', 'integer', '10', 'unsigned', '1', 'not null', 'uuid'); + } + return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 0f482d1d5e6..0435b37f587 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -192,6 +192,8 @@ CREATE TABLE `prefix_event` ( `timestart` int(10) unsigned NOT NULL default '0', `timeduration` int(10) unsigned NOT NULL default '0', `visible` tinyint(4) NOT NULL default '1', + `uuid` char(36) NOT NULL default '', + `sequence` int(10) unsigned NOT NULL default '1', `timemodified` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 784f7423d4b..1529fb4c3a8 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1193,6 +1193,11 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2005072000) { // Add a couple fields to mdl_event to work towards iCal import/export + table_column('event', '', 'uuid', 'char', '36', '', '', 'not null', 'visible'); + table_column('event', '', 'sequence', 'integer', '10', 'unsigned', '1', 'not null', 'uuid'); + } + return $result; } diff --git a/lib/db/postgres7.sql b/lib/db/postgres7.sql index f59c768bd6b..900dd764251 100644 --- a/lib/db/postgres7.sql +++ b/lib/db/postgres7.sql @@ -126,6 +126,8 @@ CREATE TABLE prefix_event ( timestart integer NOT NULL default '0', timeduration integer NOT NULL default '0', visible integer NOT NULL default '1', + uuid char(36) NOT NULL default '', + sequence integer NOT NULL default '1', timemodified integer NOT NULL default '0' ); diff --git a/version.php b/version.php index d324dbffbe1..3f8bcde61d9 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 = 2005071700; // YYYYMMDD = date + $version = 2005072000; // YYYYMMDD = date // XY = increments within a single day $release = '1.6 development'; // Human-friendly version name