migrations for kronolith
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 4 Oct 2010 21:13:43 +0000 (17:13 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 4 Oct 2010 21:15:22 +0000 (17:15 -0400)
The only thing not handled here is the table for using mysql geospatial extensions,
as I'm not sure how to create the special spacial index via Horde_Db. I left behind
a sql creation script for those who decide to use the mysql geo driver in kronolith.

54 files changed:
kronolith/migration/10_kronolith_upgrade_exceptions.php [new file with mode: 0644]
kronolith/migration/11_kronolith_upgrade_resourceemail.php.php [new file with mode: 0644]
kronolith/migration/12_kronolith_upgrade_addzoom.php.php [new file with mode: 0644]
kronolith/migration/13_kronolith_upgrade_systemshares.php.php [new file with mode: 0644]
kronolith/migration/1_kronolith_base_tables.php [new file with mode: 0644]
kronolith/migration/2_kronolith_upgrade_autoincrement.php [new file with mode: 0644]
kronolith/migration/3_kronolith_upgrade_addallday.php [new file with mode: 0644]
kronolith/migration/4_kronolith_upgrade_addalarmmethods.php [new file with mode: 0644]
kronolith/migration/5_kronolith_upgrade_addcolor.php [new file with mode: 0644]
kronolith/migration/6_kronolith_upgrade_addresources.php.php [new file with mode: 0644]
kronolith/migration/7_kronolith_upgrade_resourceautoincrement.php [new file with mode: 0644]
kronolith/migration/8_kronolith_upgrade_addgeo.php.php [new file with mode: 0644]
kronolith/migration/9_kronolith_upgrade_addurl.php.php [new file with mode: 0644]
kronolith/scripts/sql/add_geo.mysql.sql [new file with mode: 0644]
kronolith/scripts/upgrades/1.1_to_2.0.mysql.sql [deleted file]
kronolith/scripts/upgrades/1.1_to_2.0.oci8.sql [deleted file]
kronolith/scripts/upgrades/1.1_to_2.0.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2.1_to_2.2.oci8.sql [deleted file]
kronolith/scripts/upgrades/2.1_to_2.2.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2.1_to_2.2.sql [deleted file]
kronolith/scripts/upgrades/2.2_to_2.3.oci8.sql [deleted file]
kronolith/scripts/upgrades/2.2_to_2.3.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2.2_to_2.3.sql [deleted file]
kronolith/scripts/upgrades/2006-03-16_add_private_flag.sql [deleted file]
kronolith/scripts/upgrades/2006-08-20_fix_recur_int_fields.mysql.sql [deleted file]
kronolith/scripts/upgrades/2006-08-20_fix_recur_int_fields.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2007-03-23_add_recur_count.sql [deleted file]
kronolith/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql [deleted file]
kronolith/scripts/upgrades/2008-09-23_fix_group_uid.sql [deleted file]
kronolith/scripts/upgrades/2008-10-21_add_allday_flag.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2008-10-21_add_allday_flag.sql [deleted file]
kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.mssql.sql [deleted file]
kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.oci8.sql [deleted file]
kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.sql [deleted file]
kronolith/scripts/upgrades/2009-02-20_add_attribute_color.sql [deleted file]
kronolith/scripts/upgrades/2009-08-17_add_resources.sql [deleted file]
kronolith/scripts/upgrades/2009-10-22_fix_resource_members.sql [deleted file]
kronolith/scripts/upgrades/2009-10-22_resource_indexes.sql [deleted file]
kronolith/scripts/upgrades/2009-12-03_add_geo.mysql.sql [deleted file]
kronolith/scripts/upgrades/2009-12-03_add_geo.sql [deleted file]
kronolith/scripts/upgrades/2009-12-09_add_url.mssql.sql [deleted file]
kronolith/scripts/upgrades/2009-12-09_add_url.oci8.sql [deleted file]
kronolith/scripts/upgrades/2009-12-09_add_url.sql [deleted file]
kronolith/scripts/upgrades/2009-12-11_fix_column_names.mysql.sql [deleted file]
kronolith/scripts/upgrades/2009-12-11_fix_column_names.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2009-12-11_fix_column_names.sql [deleted file]
kronolith/scripts/upgrades/2010-02-03_system_shares.sql [deleted file]
kronolith/scripts/upgrades/2010-03-25_add_baseid.sql [deleted file]
kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.oci8.sql [deleted file]
kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.pgsql.sql [deleted file]
kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.sql [deleted file]
kronolith/scripts/upgrades/2010-04-08_add_resourceemail.oci8.sql [deleted file]
kronolith/scripts/upgrades/2010-04-08_add_resourceemail.sql [deleted file]
kronolith/scripts/upgrades/2010-06-16_add_zoom.sql [deleted file]

diff --git a/kronolith/migration/10_kronolith_upgrade_exceptions.php b/kronolith/migration/10_kronolith_upgrade_exceptions.php
new file mode 100644 (file)
index 0000000..0a4685b
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Adds url field
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeExceptions extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_events');
+        $cols = $t->getColumns();
+        if (!in_array('event_baseid', array_keys($cols))) {
+            $this->addColumn('kronolith_events', 'event_baseid', 'string', array('limit' => 255, 'default' => ''));
+            $this->addColumn('kronolith_events', 'event_exceptionoriginaldate', 'datetime');
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_events', 'event_baseid');
+        $this->removeColumn('kronolith_events', 'event_exceptionoriginaldate');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/11_kronolith_upgrade_resourceemail.php.php b/kronolith/migration/11_kronolith_upgrade_resourceemail.php.php
new file mode 100644 (file)
index 0000000..a3a0adc
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Adds url field
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeResourceEmail extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_resources');
+        $cols = $t->getColumns();
+        if (!in_array('resource_email', array_keys($cols))) {
+            $this->addColumn('kronolith_resources', 'resource_email', 'string', array('limit' => 255));
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_resources', 'resource_email');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/12_kronolith_upgrade_addzoom.php.php b/kronolith/migration/12_kronolith_upgrade_addzoom.php.php
new file mode 100644 (file)
index 0000000..332c427
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Adds url field
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddZoom extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_events_geo');
+        $cols = $t->getColumns();
+        if (!in_array('event_zoom', array_keys($cols))) {
+            $this->addColumn('kronolith_events_geo', 'event_zoom', 'integer', array('default' => 0, 'null' => false));
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_events_geo', 'event_zoom');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/13_kronolith_upgrade_systemshares.php.php b/kronolith/migration/13_kronolith_upgrade_systemshares.php.php
new file mode 100644 (file)
index 0000000..d847a2d
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Adds url field
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeSystemShares extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $this->changeColumn('kronolith_shares', 'share_owner', 'string', array('limit' => 255));
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->changeColumn('kronolith_shares', 'share_owner', 'string', array('limit' => 255, 'null' => false));
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/1_kronolith_base_tables.php b/kronolith/migration/1_kronolith_base_tables.php
new file mode 100644 (file)
index 0000000..dc6a6dc
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Create kronolith base tables as of Kronolith 2.3.5
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithBaseTables extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $tableList = $this->tables();
+
+        if (!in_array('kronolith_events', $tableList)) {
+            $t = $this->createTable('kronolith_events', array('primaryKey' => false));
+            $t->column('event_id', 'string', array('limit' => 32, 'null' => false));
+            $t->column('event_uid', 'string', array('limit' => 255, 'null' => false));
+            $t->column('calendar_id', 'string', array('limit' => 255, 'null' => false));
+            $t->column('event_creator_id', 'string', array('limit' => 255, 'null' => false));
+            $t->column('event_description', 'text');
+            $t->column('event_location', 'text');
+            $t->column('event_status', 'integer', array('default' => 0));
+            $t->column('event_attendees', 'text');
+            $t->column('event_keywords', 'text');
+            $t->column('event_exceptions', 'text');
+            $t->column('event_title', 'string', array('limit' => 255));
+            $t->column('event_category', 'string', array('limit' => 80));
+            $t->column('event_recurtype', 'integer', array('default' => 0));
+            $t->column('event_recurinterval', 'integer');
+            $t->column('event_recurdays', 'integer');
+            $t->column('event_recurenddate', 'datetime');
+            $t->column('event_recurcount', 'integer');
+            $t->column('event_start', 'datetime');
+            $t->column('event_end', 'datetime');
+            $t->column('event_alarm', 'integer', array('default' => 0));
+            $t->column('event_modified', 'integer', array('default' => 0));
+            $t->column('event_private', 'integer', array('default' => 0, 'null' => false));
+            $t->primaryKey(array('event_id'));
+            $t->end();
+
+            $this->addIndex('kronolith_events', array('calendar_id'));
+            $this->addIndex('kronolith_events', array('event_uid'));
+        }
+
+        if (!in_array('kronolith_storage', $tableList)) {
+            $t = $this->createTable('kronolith_storage');
+            $t->column('vfb_owner', 'string', array('limit' => 255));
+            $t->column('vfb_email', 'string', array('limit' => 255, 'null' => false));
+            $t->column('vfb_serialized', 'text', array('null' => false));
+            $t->end();
+
+            $this->addIndex('kronolith_storage', 'vfb_owner');
+            $this->addIndex('kronolith_storage', 'vfb_email');
+        }
+
+        if (!in_array('kronolith_shares', $tableList)) {
+            $t = $this->createTable('kronolith_shares', array('primaryKey' => false));
+            $t->column('share_id', 'integer', array('null' => false));
+            $t->column('share_name', 'string', array('limit' => 255, 'null' => false));
+            $t->column('share_owner', 'string', array('limit' => 255, 'null' => false));
+            $t->column('share_flags', 'integer', array('default' => 0, 'null' => false));
+            $t->column('perm_creator', 'integer', array('default' => 0, 'null' => false));
+            $t->column('perm_default', 'integer', array('default' => 0, 'null' => false));
+            $t->column('perm_guest', 'integer', array('default' => 0, 'null' => false));
+            $t->column('attribute_name', 'string', array('limit' => 255, 'null' => false));
+            $t->column('attribute_desc', 'string', array('limit' => 255));
+            $t->primaryKey(array('share_id'));
+            $t->end();
+
+            $this->addIndex('kronolith_shares', 'share_name');
+            $this->addIndex('kronolith_shares', 'share_owner');
+            $this->addIndex('kronolith_shares', 'perm_creator');
+            $this->addIndex('kronolith_shares', 'perm_default');
+            $this->addIndex('kronolith_shares', 'perm_guest');
+        }
+
+        if (!in_array('kronolith_shares_groups', $tableList)) {
+            $t = $this->createTable('kronolith_shares_groups');
+            $t->column('share_id', 'integer', array('null' => false));
+            $t->column('group_uid', 'string', array('limit' => 255, 'null' => false));
+            $t->column('perm', 'integer', array('null' => false));
+            $t->end();
+
+            $this->addIndex('kronolith_shares_groups', 'share_id');
+            $this->addIndex('kronolith_shares_groups', 'group_uid');
+            $this->addIndex('kronolith_shares_groups', 'perm');
+        }
+
+        if (!in_array('kronolith_shares_users', $tableList)) {
+            $t = $this->createTable('kronolith_shares_users');
+
+            $t->column('share_id', 'integer', array('null' => false));
+            $t->column('user_id', 'string', array('limit' => 255));
+            $t->column('perm', 'integer', array('null' => false));
+            $t->end();
+
+            $this->addIndex('kronolith_shares_users', 'share_id');
+            $this->addIndex('kronolith_shares_users', 'user_id');
+            $this->addIndex('kronolith_shares_users', 'perm');
+        }
+    }
+
+    /**
+     * Downgrade to 0
+     */
+    public function down()
+    {
+        $this->dropTable('kronolith_events');
+        $this->dropTable('kronolith_shares');
+        $this->dropTable('kronolith_storage');
+        $this->dropTable('kronolith_shares_groups');
+        $this->dropTable('kronolith_shares_users');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/2_kronolith_upgrade_autoincrement.php b/kronolith/migration/2_kronolith_upgrade_autoincrement.php
new file mode 100644 (file)
index 0000000..6606a3a
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Adds autoincrement flags
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAutoIncrement extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $this->changeColumn('kronolith_shares', 'share_id', 'integer', array('null' => false, 'autoincrement' => true));
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->changeColumn('kronolith_shares', 'share_id', 'integer', array('null' => false));
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/3_kronolith_upgrade_addallday.php b/kronolith/migration/3_kronolith_upgrade_addallday.php
new file mode 100644 (file)
index 0000000..75ef3e4
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddAllDay extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_events');
+        $cols = $t->getColumns();
+        if (!in_array('event_allday', array_keys($cols))) {
+            $this->addColumn('kronolith_events', 'event_allday', 'integer', array('default' => 0));
+            $this->_connection->execute('UPDATE kronolith_events SET event_allday = 1 WHERE event_start + INTERVAL 1 DAY = event_end');
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_events', 'event_allday');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/4_kronolith_upgrade_addalarmmethods.php b/kronolith/migration/4_kronolith_upgrade_addalarmmethods.php
new file mode 100644 (file)
index 0000000..fec6158
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddAlarmMethods extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_events');
+        $cols = $t->getColumns();
+        if (!in_array('event_alarm_methods', array_keys($cols))) {
+            $this->addColumn('kronolith_events', 'event_alarm_methods', 'text');
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_events', 'event_alarm_methods');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/5_kronolith_upgrade_addcolor.php b/kronolith/migration/5_kronolith_upgrade_addcolor.php
new file mode 100644 (file)
index 0000000..7a6e1c5
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddColor extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_shares');
+        $cols = $t->getColumns();
+        if (!in_array('attribute_color', array_keys($cols))) {
+            $this->addColumn('kronolith_shares', 'attribute_color', 'string', array('limit' => 7));
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_shares', 'attribute_color');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/6_kronolith_upgrade_addresources.php.php b/kronolith/migration/6_kronolith_upgrade_addresources.php.php
new file mode 100644 (file)
index 0000000..aeceae5
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Adds resource table.
+ * 
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddResources extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $tableList = $this->tables();
+        if (!in_array('kronolith_resources', $tableList)) {
+            $t = $this->createTable('kronolith_resources', array('primaryKey' => false));
+            $t->column('resource_id', 'integer', array('null' => false));
+            $t->column('resource_name', 'string', array('limit' => 255));
+            $t->column('resource_calendar', 'string', array('limit' => 255));
+            $t->column('resource_description', 'text');
+            $t->column('resource_response_type', 'integer', array('default' => 0));
+            $t->column('resource_type', 'string', array('limit' => 255, 'null' => false));
+            $t->column('resource_members', 'text');
+            $t->primaryKey(array('resource_id'));
+            $t->end();
+
+            $this->addIndex('kronolith_resources', 'resource_calendar');
+            $this->addIndex('kronolith_resources', 'resource_type');
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->dropTable('kronolith_resources');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/7_kronolith_upgrade_resourceautoincrement.php b/kronolith/migration/7_kronolith_upgrade_resourceautoincrement.php
new file mode 100644 (file)
index 0000000..7a943c1
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Adds autoincrement flags
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeResourceAutoIncrement extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $this->changeColumn('kronolith_resources', 'resource_id', 'integer', array('null' => false, 'autoincrement' => true));
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->changeColumn('kronolith_resources', 'resource_id', 'integer', array('null' => false, 'autoincrement' => false));
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/8_kronolith_upgrade_addgeo.php.php b/kronolith/migration/8_kronolith_upgrade_addgeo.php.php
new file mode 100644 (file)
index 0000000..046ce11
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Adds geospatial data table for NON-MYSQL SPATIAL EXTENSIONS ONLY.
+ * 
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddGeo extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $tableList = $this->tables();
+        if (!in_array('kronolith_events_geo', $tableList)) {
+            $t = $this->createTable('kronolith_events_geo', array('primaryKey' => false));
+            $t->column('event_id', 'string', array('limit' => 32, 'null' => false));
+            $t->column('event_lat', 'string', array('limit' => 32, 'null' => false));
+            $t->column('event_lon', 'string', array('limit' => 32, 'null' => false));
+            $t->primaryKey(array('event_id'));
+            $t->end();
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->dropTable('kronolith_events_geo');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/migration/9_kronolith_upgrade_addurl.php.php b/kronolith/migration/9_kronolith_upgrade_addurl.php.php
new file mode 100644 (file)
index 0000000..212496d
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Adds url field
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Kronolith
+ */
+class KronolithUpgradeAddUrl extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $t = $this->_connection->table('kronolith_events');
+        $cols = $t->getColumns();
+        if (!in_array('event_url', array_keys($cols))) {
+            $this->addColumn('kronolith_events', 'event_url', 'text');
+        }
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->removeColumn('kronolith_events', 'event_url');
+    }
+
+}
\ No newline at end of file
diff --git a/kronolith/scripts/sql/add_geo.mysql.sql b/kronolith/scripts/sql/add_geo.mysql.sql
new file mode 100644 (file)
index 0000000..d974f00
--- /dev/null
@@ -0,0 +1,5 @@
+CREATE TABLE kronolith_events_geo (
+    event_id VARCHAR(32) NOT NULL,
+    event_coordinates POINT NOT NULL,
+    SPATIAL INDEX (coordinates)
+);
\ No newline at end of file
diff --git a/kronolith/scripts/upgrades/1.1_to_2.0.mysql.sql b/kronolith/scripts/upgrades/1.1_to_2.0.mysql.sql
deleted file mode 100644 (file)
index caa31e1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
--- You can simply execute this file in your database.
---
--- Run as:
---
--- $ mysql --user=root --password=<MySQL-root-password> <db name> < 1.1_to_2.0.mysql.sql
-
-ALTER TABLE kronolith_events CHANGE COLUMN event_id event_id VARCHAR(32) NOT NULL;
-ALTER TABLE kronolith_events CHANGE COLUMN event_title event_title VARCHAR(255);
-
-ALTER TABLE kronolith_events ADD COLUMN event_uid VARCHAR(255) NOT NULL;
-ALTER TABLE kronolith_events ADD COLUMN event_creator_id VARCHAR(255) NOT NULL;
-ALTER TABLE kronolith_events ADD COLUMN event_status INT DEFAULT 0;
-ALTER TABLE kronolith_events ADD COLUMN event_attendees TEXT;
-
-CREATE INDEX kronolith_uid_idx ON kronolith_events (event_uid);
-
-
-CREATE TABLE kronolith_storage (
-    vfb_owner      VARCHAR(255),
-    vfb_email      VARCHAR(255) NOT NULL,
-    vfb_serialized TEXT NOT NULL
-);
-
-CREATE INDEX kronolith_vfb_owner_idx ON kronolith_storage (vfb_owner);
-CREATE INDEX kronolith_vfb_email_idx ON kronolith_storage (vfb_email);
diff --git a/kronolith/scripts/upgrades/1.1_to_2.0.oci8.sql b/kronolith/scripts/upgrades/1.1_to_2.0.oci8.sql
deleted file mode 100644 (file)
index a21ec76..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-ALTER TABLE kronolith_events ADD COLUMN event_id_new VARCHAR2(32);
-UPDATE kronolith_events SET event_id_new = event_id;
-ALTER TABLE kronolith_events DROP COLUMN event_id;
-ALTER TABLE kronolith_events RENAME COLUMN event_id_new to event_id;
-ALTER TABLE kronolith_events ADD CONSTRAINT event_id PRIMARY KEY (event_id);
-ALTER TABLE kronolith_events MODIFY event_title VARCHAR2(255);
-
-ALTER TABLE kronolith_events ADD event_uid VARCHAR2(255);
-ALTER TABLE kronolith_events ADD event_creator_id VARCHAR2(255);
-ALTER TABLE kronolith_events ADD event_status NUMBER(2) DEFAULT 0;
-ALTER TABLE kronolith_events ADD event_attendees VARCHAR2(4000);
-
-CREATE INDEX kronolith_uid_idx ON kronolith_events (event_uid);
-
-
-CREATE TABLE kronolith_storage (
-    vfb_owner      VARCHAR2(255),
-    vfb_email      VARCHAR2(255) NOT NULL,
-    vfb_serialized VARCHAR2(4000) NOT NULL
-);
-
-CREATE INDEX kronolith_vfb_owner_idx ON kronolith_storage (vfb_owner);
-CREATE INDEX kronolith_vfb_email_idx ON kronolith_storage (vfb_email);
diff --git a/kronolith/scripts/upgrades/1.1_to_2.0.pgsql.sql b/kronolith/scripts/upgrades/1.1_to_2.0.pgsql.sql
deleted file mode 100644 (file)
index 23d44c8..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
--- Update script to update Kronolith 1.1 data to 2.x data for pgsql
--- Converted from mysql version by Daniel E. Markle <lexicon@seul.org>
---
--- You can simply execute this file in your database.
---
--- Run as:
---
--- $ psql <db name> -f < 1.1_to_2.0.pgsql.sql
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_id_new VARCHAR(32);
-UPDATE kronolith_events SET event_id_new = event_id;
-ALTER TABLE kronolith_events DROP event_id;
-ALTER TABLE kronolith_events RENAME event_id_new TO event_id;
-ALTER TABLE kronolith_events ALTER COLUMN event_id SET NOT NULL;
-COMMIT;
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_title_new VARCHAR(255);
-UPDATE kronolith_events SET event_title_new = event_title;
-ALTER TABLE kronolith_events DROP event_title;
-ALTER TABLE kronolith_events RENAME event_title_new TO event_title;
-COMMIT;
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_uid VARCHAR(255);
-UPDATE kronolith_events SET event_uid = '';
-ALTER TABLE kronolith_events ALTER COLUMN event_uid SET NOT NULL;
-COMMIT;
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_creator_id VARCHAR(255);
-UPDATE kronolith_events SET event_creator_id = '';
-ALTER TABLE kronolith_events ALTER COLUMN event_creator_id SET NOT NULL;
-COMMIT;
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_status INT;
-UPDATE kronolith_events SET event_status = 0;
-ALTER TABLE kronolith_events ALTER COLUMN event_status SET DEFAULT 0;
-COMMIT;
-
-ALTER TABLE kronolith_events ADD COLUMN event_attendees TEXT;
-
-CREATE INDEX kronolith_uid_idx ON kronolith_events (event_uid);
-
-CREATE TABLE kronolith_storage (
-    vfb_owner      VARCHAR(255),
-    vfb_email      VARCHAR(255) NOT NULL,
-    vfb_serialized TEXT NOT NULL
-);
-
-CREATE INDEX kronolith_vfb_owner_idx ON kronolith_storage (vfb_owner);
-CREATE INDEX kronolith_vfb_email_idx ON kronolith_storage (vfb_email);
diff --git a/kronolith/scripts/upgrades/2.1_to_2.2.oci8.sql b/kronolith/scripts/upgrades/2.1_to_2.2.oci8.sql
deleted file mode 100644 (file)
index 3b101a9..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-ALTER TABLE kronolith_events ADD event_private NUMBER(1) DEFAULT 0 NOT NULL;
-ALTER TABLE kronolith_events ADD event_recurcount NUMBER(8);
-
-CREATE TABLE kronolith_shares (
-    share_id NUMBER(16) NOT NULL,
-    share_name VARCHAR2(255) NOT NULL,
-    share_owner VARCHAR2(255) NOT NULL,
-    share_flags NUMBER(8) DEFAULT 0 NOT NULL,
-    perm_creator NUMBER(8) DEFAULT 0 NOT NULL,
-    perm_default NUMBER(8) DEFAULT 0 NOT NULL,
-    perm_guest NUMBER(8) DEFAULT 0 NOT NULL,
-    attribute_name VARCHAR2(255) NOT NULL,
-    attribute_desc VARCHAR2(255),
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX kronolith_shares_name_idx ON kronolith_shares (share_name);
-CREATE INDEX kronolith_shares_owner_idx ON kronolith_shares (share_owner);
-CREATE INDEX kronolith_shares_creator_idx ON kronolith_shares (perm_creator);
-CREATE INDEX kronolith_shares_default_idx ON kronolith_shares (perm_default);
-CREATE INDEX kronolith_shares_guest_idx ON kronolith_shares (perm_guest);
-
-CREATE TABLE kronolith_shares_groups (
-    share_id NUMBER(16) NOT NULL,
-    group_uid NUMBER(16) NOT NULL,
-    perm NUMBER(8) NOT NULL
-);
-
-CREATE INDEX kronolith_groups_share_id_idx ON kronolith_shares_groups (share_id);
-CREATE INDEX kronolith_groups_group_uid_idx ON kronolith_shares_groups (group_uid);
-CREATE INDEX kronolith_groups_perm_idx ON kronolith_shares_groups (perm);
-
-CREATE TABLE kronolith_shares_users (
-    share_id NUMBER(16) NOT NULL,
-    user_uid VARCHAR2(32) NOT NULL,
-    perm NUMBER(8) NOT NULL
-);
-
-CREATE INDEX kronolith_users_share_id_idx ON kronolith_shares_users (share_id);
-CREATE INDEX kronolith_users_user_uid_idx ON kronolith_shares_users (user_uid);
-CREATE INDEX kronolith_users_perm_idx ON kronolith_shares_users (perm);
diff --git a/kronolith/scripts/upgrades/2.1_to_2.2.pgsql.sql b/kronolith/scripts/upgrades/2.1_to_2.2.pgsql.sql
deleted file mode 100644 (file)
index d2879ff..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-BEGIN;
-ALTER TABLE kronolith_events ADD event_private INT;
-UPDATE kronolith_events SET event_private = 0;
-ALTER TABLE kronolith_events ALTER event_private SET DEFAULT 0;
-ALTER TABLE kronolith_events ALTER event_private SET NOT NULL;
-COMMIT;
-ALTER TABLE kronolith_events ADD event_recurcount INT;
-
-CREATE TABLE kronolith_shares (
-    share_id INT NOT NULL,
-    share_name VARCHAR(255) NOT NULL,
-    share_owner VARCHAR(32) NOT NULL,
-    share_flags SMALLINT DEFAULT 0 NOT NULL,
-    perm_creator SMALLINT DEFAULT 0 NOT NULL,
-    perm_default SMALLINT DEFAULT 0 NOT NULL,
-    perm_guest SMALLINT DEFAULT 0 NOT NULL,
-    attribute_name VARCHAR(255) NOT NULL,
-    attribute_desc VARCHAR(255),
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX kronolith_shares_share_name_idx ON kronolith_shares (share_name);
-CREATE INDEX kronolith_shares_share_owner_idx ON kronolith_shares (share_owner);
-CREATE INDEX kronolith_shares_perm_creator_idx ON kronolith_shares (perm_creator);
-CREATE INDEX kronolith_shares_perm_default_idx ON kronolith_shares (perm_default);
-CREATE INDEX kronolith_shares_perm_guest_idx ON kronolith_shares (perm_guest);
-
-CREATE TABLE kronolith_shares_groups (
-    share_id INT NOT NULL,
-    group_uid INT NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX kronolith_shares_groups_share_id_idx ON kronolith_shares_groups (share_id);
-CREATE INDEX kronolith_shares_groups_group_uid_idx ON kronolith_shares_groups (group_uid);
-CREATE INDEX kronolith_shares_groups_perm_idx ON kronolith_shares_groups (perm);
-
-CREATE TABLE kronolith_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(32) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX kronolith_shares_users_share_id_idx ON kronolith_shares_users (share_id);
-CREATE INDEX kronolith_shares_users_user_uid_idx ON kronolith_shares_users (user_uid);
-CREATE INDEX kronolith_shares_users_perm_idx ON kronolith_shares_users (perm);
diff --git a/kronolith/scripts/upgrades/2.1_to_2.2.sql b/kronolith/scripts/upgrades/2.1_to_2.2.sql
deleted file mode 100644 (file)
index 88341fd..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-ALTER TABLE kronolith_events ADD COLUMN event_private INT DEFAULT 0 NOT NULL;
-ALTER TABLE kronolith_events ADD COLUMN event_recurcount INT;
-
-CREATE TABLE kronolith_shares (
-    share_id INT NOT NULL,
-    share_name VARCHAR(255) NOT NULL,
-    share_owner VARCHAR(32) NOT NULL,
-    share_flags SMALLINT DEFAULT 0 NOT NULL,
-    perm_creator SMALLINT DEFAULT 0 NOT NULL,
-    perm_default SMALLINT DEFAULT 0 NOT NULL,
-    perm_guest SMALLINT DEFAULT 0 NOT NULL,
-    attribute_name VARCHAR(255) NOT NULL,
-    attribute_desc VARCHAR(255),
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX kronolith_shares_share_name_idx ON kronolith_shares (share_name);
-CREATE INDEX kronolith_shares_share_owner_idx ON kronolith_shares (share_owner);
-CREATE INDEX kronolith_shares_perm_creator_idx ON kronolith_shares (perm_creator);
-CREATE INDEX kronolith_shares_perm_default_idx ON kronolith_shares (perm_default);
-CREATE INDEX kronolith_shares_perm_guest_idx ON kronolith_shares (perm_guest);
-
-CREATE TABLE kronolith_shares_groups (
-    share_id INT NOT NULL,
-    group_uid INT NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX kronolith_shares_groups_share_id_idx ON kronolith_shares_groups (share_id);
-CREATE INDEX kronolith_shares_groups_group_uid_idx ON kronolith_shares_groups (group_uid);
-CREATE INDEX kronolith_shares_groups_perm_idx ON kronolith_shares_groups (perm);
-
-CREATE TABLE kronolith_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(32) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX kronolith_shares_users_share_id_idx ON kronolith_shares_users (share_id);
-CREATE INDEX kronolith_shares_users_user_uid_idx ON kronolith_shares_users (user_uid);
-CREATE INDEX kronolith_shares_users_perm_idx ON kronolith_shares_users (perm);
diff --git a/kronolith/scripts/upgrades/2.2_to_2.3.oci8.sql b/kronolith/scripts/upgrades/2.2_to_2.3.oci8.sql
deleted file mode 100644 (file)
index 12e50d9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_shares MODIFY share_owner VARCHAR2(255);
-ALTER TABLE kronolith_shares_users MODIFY user_uid VARCHAR2(255);
-ALTER TABLE kronolith_shares_groups MODIFY group_uid VARCHAR2(255);
diff --git a/kronolith/scripts/upgrades/2.2_to_2.3.pgsql.sql b/kronolith/scripts/upgrades/2.2_to_2.3.pgsql.sql
deleted file mode 100644 (file)
index 6fb7df3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_shares ALTER share_owner TYPE VARCHAR(255);
-ALTER TABLE kronolith_shares_users ALTER user_uid TYPE VARCHAR(255);
-ALTER TABLE kronolith_shares_groups ALTER group_uid TYPE VARCHAR(255);
diff --git a/kronolith/scripts/upgrades/2.2_to_2.3.sql b/kronolith/scripts/upgrades/2.2_to_2.3.sql
deleted file mode 100644 (file)
index 876b15c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_shares CHANGE share_owner share_owner VARCHAR(255);
-ALTER TABLE kronolith_shares_users CHANGE user_uid user_uid VARCHAR(255);
-ALTER TABLE kronolith_shares_groups CHANGE group_uid group_uid VARCHAR(255);
diff --git a/kronolith/scripts/upgrades/2006-03-16_add_private_flag.sql b/kronolith/scripts/upgrades/2006-03-16_add_private_flag.sql
deleted file mode 100644 (file)
index 3c9d516..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_private INT DEFAULT 0 NOT NULL;
diff --git a/kronolith/scripts/upgrades/2006-08-20_fix_recur_int_fields.mysql.sql b/kronolith/scripts/upgrades/2006-08-20_fix_recur_int_fields.mysql.sql
deleted file mode 100644 (file)
index 0ace506..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_events CHANGE event_recurtype event_recurtype SMALLINT DEFAULT 0;
-ALTER TABLE kronolith_events CHANGE event_recurinterval event_recurinterval SMALLINT;
-ALTER TABLE kronolith_events CHANGE event_recurdays event_recurdays SMALLINT;
diff --git a/kronolith/scripts/upgrades/2006-08-20_fix_recur_int_fields.pgsql.sql b/kronolith/scripts/upgrades/2006-08-20_fix_recur_int_fields.pgsql.sql
deleted file mode 100644 (file)
index 4845abc..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_recurtype_new SMALLINT DEFAULT 0;
-UPDATE kronolith_events SET event_recurtype_new = CAST (event_recurtype AS SMALLINT);
-ALTER TABLE kronolith_events DROP event_recurtype;
-ALTER TABLE kronolith_events RENAME event_recurtype_new TO event_recurtype;
-COMMIT;
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_recurinterval_new SMALLINT;
-UPDATE kronolith_events SET event_recurinterval_new = CAST (event_recurinterval AS SMALLINT);
-ALTER TABLE kronolith_events DROP event_recurinterval;
-ALTER TABLE kronolith_events RENAME event_recurinterval_new TO event_recurinterval;
-COMMIT;
-
-BEGIN;
-ALTER TABLE kronolith_events ADD COLUMN event_recurdays_new SMALLINT;
-UPDATE kronolith_events SET event_recurdays_new = CAST (event_recurdays AS SMALLINT);
-ALTER TABLE kronolith_events DROP event_recurdays;
-ALTER TABLE kronolith_events RENAME event_recurdays_new TO event_recurdays;
-COMMIT;
diff --git a/kronolith/scripts/upgrades/2007-03-23_add_recur_count.sql b/kronolith/scripts/upgrades/2007-03-23_add_recur_count.sql
deleted file mode 100644 (file)
index 581a9ed..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_recurcount INT;
diff --git a/kronolith/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql b/kronolith/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql
deleted file mode 100644 (file)
index 1338dc8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE kronolith_shares CHANGE share_owner share_owner VARCHAR(255);
-ALTER TABLE kronolith_shares_users CHANGE user_uid user_uid VARCHAR(255);
diff --git a/kronolith/scripts/upgrades/2008-09-23_fix_group_uid.sql b/kronolith/scripts/upgrades/2008-09-23_fix_group_uid.sql
deleted file mode 100644 (file)
index d367c68..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_shares_groups CHANGE group_uid group_uid VARCHAR(255);
diff --git a/kronolith/scripts/upgrades/2008-10-21_add_allday_flag.pgsql.sql b/kronolith/scripts/upgrades/2008-10-21_add_allday_flag.pgsql.sql
deleted file mode 100644 (file)
index 4745f5e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_events ADD event_allday INT DEFAULT 0;
-
-UPDATE kronolith_events SET event_allday = 1 WHERE event_start + INTERVAL '1 DAY' = event_end;
diff --git a/kronolith/scripts/upgrades/2008-10-21_add_allday_flag.sql b/kronolith/scripts/upgrades/2008-10-21_add_allday_flag.sql
deleted file mode 100644 (file)
index 3d1ddb6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_events ADD event_allday INT DEFAULT 0;
-
-UPDATE kronolith_events SET event_allday = 1 WHERE event_start + INTERVAL 1 DAY = event_end;
diff --git a/kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.mssql.sql b/kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.mssql.sql
deleted file mode 100644 (file)
index 2189757..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_alarm_methods VARCHAR(MAX);
diff --git a/kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.oci8.sql b/kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.oci8.sql
deleted file mode 100644 (file)
index a569f6e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_alarm_methods VARCHAR2(4000);
diff --git a/kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.sql b/kronolith/scripts/upgrades/2009-01-22_add_alarm_methods.sql
deleted file mode 100644 (file)
index 70feaed..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_alarm_methods TEXT;
diff --git a/kronolith/scripts/upgrades/2009-02-20_add_attribute_color.sql b/kronolith/scripts/upgrades/2009-02-20_add_attribute_color.sql
deleted file mode 100644 (file)
index 9d65ba1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_shares ADD attribute_color VARCHAR(7);
diff --git a/kronolith/scripts/upgrades/2009-08-17_add_resources.sql b/kronolith/scripts/upgrades/2009-08-17_add_resources.sql
deleted file mode 100644 (file)
index 001ac7e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-ALTER TABLE kronolith_events ADD event_resources TEXT;
-
-CREATE TABLE kronolith_resources (
-    resource_id INT NOT NULL,
-    resource_name VARCHAR(255),
-    resource_calendar VARCHAR(255),
-    resource_description TEXT,
-    resource_category VARCHAR(255) DEFAULT '',
-    resource_response_type INT DEFAULT 0,
-    resource_type VARCHAR(255) NOT NULL,
-    resource_members TEXT,
-
-    PRIMARY KEY (resource_id)
-);
diff --git a/kronolith/scripts/upgrades/2009-10-22_fix_resource_members.sql b/kronolith/scripts/upgrades/2009-10-22_fix_resource_members.sql
deleted file mode 100644 (file)
index 6f82427..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_resources CHANGE resource_members resource_members TEXT
diff --git a/kronolith/scripts/upgrades/2009-10-22_resource_indexes.sql b/kronolith/scripts/upgrades/2009-10-22_resource_indexes.sql
deleted file mode 100644 (file)
index 36d08f6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE kronolith_resources DROP resource_category;
-CREATE INDEX kronolith_resources_type ON kronolith_resources (resource_type);
-CREATE INDEX kronolith_resources_calendar ON kronolith_resources (resource_calendar);
diff --git a/kronolith/scripts/upgrades/2009-12-03_add_geo.mysql.sql b/kronolith/scripts/upgrades/2009-12-03_add_geo.mysql.sql
deleted file mode 100644 (file)
index bce3604..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CREATE TABLE kronolith_events_geo (
-    event_id VARCHAR(32) NOT NULL,
-    coordinates POINT NOT NULL,
-    SPATIAL INDEX (coordinates)
-);
diff --git a/kronolith/scripts/upgrades/2009-12-03_add_geo.sql b/kronolith/scripts/upgrades/2009-12-03_add_geo.sql
deleted file mode 100644 (file)
index 3c24f98..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CREATE TABLE kronolith_events_geo (
-    event_id VARCHAR(32) NOT NULL,
-    lat VARCHAR(32) NOT NULL,
-    lon VARCHAR(32) NOT NULL
-);
-
-CREATE INDEX kronolith_events_geo_idx ON kronolith_events_geo (event_id);
\ No newline at end of file
diff --git a/kronolith/scripts/upgrades/2009-12-09_add_url.mssql.sql b/kronolith/scripts/upgrades/2009-12-09_add_url.mssql.sql
deleted file mode 100644 (file)
index 4dbc1ae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_url VARCHAR(MAX);
diff --git a/kronolith/scripts/upgrades/2009-12-09_add_url.oci8.sql b/kronolith/scripts/upgrades/2009-12-09_add_url.oci8.sql
deleted file mode 100644 (file)
index 098ee8b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_url VARCHAR2(4000);
diff --git a/kronolith/scripts/upgrades/2009-12-09_add_url.sql b/kronolith/scripts/upgrades/2009-12-09_add_url.sql
deleted file mode 100644 (file)
index 73ce7a2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_url TEXT;
diff --git a/kronolith/scripts/upgrades/2009-12-11_fix_column_names.mysql.sql b/kronolith/scripts/upgrades/2009-12-11_fix_column_names.mysql.sql
deleted file mode 100644 (file)
index 6c8ba20..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE kronolith_events_geo CHANGE coordinates event_coordinates POINT NOT NULL;
-CREATE INDEX kronolith_events_geo_idx ON kronolith_events_geo (event_id);
\ No newline at end of file
diff --git a/kronolith/scripts/upgrades/2009-12-11_fix_column_names.pgsql.sql b/kronolith/scripts/upgrades/2009-12-11_fix_column_names.pgsql.sql
deleted file mode 100644 (file)
index ee2fe45..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE kronolith_events_geo RENAME lat TO event_lat;
-ALTER TABLE kronolith_events_geo RENAME lon TO event_lon;
diff --git a/kronolith/scripts/upgrades/2009-12-11_fix_column_names.sql b/kronolith/scripts/upgrades/2009-12-11_fix_column_names.sql
deleted file mode 100644 (file)
index d03b595..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE kronolith_events_geo CHANGE lat event_lat VARCHAR(32) NOT NULL;
-ALTER TABLE kronolith_events_geo CHANGE lon event_lon VARCHAR(32) NOT NULL;
diff --git a/kronolith/scripts/upgrades/2010-02-03_system_shares.sql b/kronolith/scripts/upgrades/2010-02-03_system_shares.sql
deleted file mode 100644 (file)
index b30f845..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_shares CHANGE share_owner share_owner VARCHAR(255);
diff --git a/kronolith/scripts/upgrades/2010-03-25_add_baseid.sql b/kronolith/scripts/upgrades/2010-03-25_add_baseid.sql
deleted file mode 100644 (file)
index 831fd06..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_baseid VARCHAR(255) DEFAULT '';
diff --git a/kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.oci8.sql b/kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.oci8.sql
deleted file mode 100644 (file)
index 9f22344..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_exceptionoriginaldate DATE;
diff --git a/kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.pgsql.sql b/kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.pgsql.sql
deleted file mode 100644 (file)
index 99a27b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_exceptionoriginaldate TIMESTAMP;
diff --git a/kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.sql b/kronolith/scripts/upgrades/2010-04-03_add_exceptionoriginaldate.sql
deleted file mode 100644 (file)
index e0658b0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events ADD event_exceptionoriginaldate DATETIME;
diff --git a/kronolith/scripts/upgrades/2010-04-08_add_resourceemail.oci8.sql b/kronolith/scripts/upgrades/2010-04-08_add_resourceemail.oci8.sql
deleted file mode 100644 (file)
index 0f67f38..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_resources ADD resource_email VARCHAR2(255);
diff --git a/kronolith/scripts/upgrades/2010-04-08_add_resourceemail.sql b/kronolith/scripts/upgrades/2010-04-08_add_resourceemail.sql
deleted file mode 100644 (file)
index ca96724..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_resources ADD resource_email VARCHAR(255);
diff --git a/kronolith/scripts/upgrades/2010-06-16_add_zoom.sql b/kronolith/scripts/upgrades/2010-06-16_add_zoom.sql
deleted file mode 100644 (file)
index 716183b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE kronolith_events_geo ADD COLUMN event_zoom INTEGER DEFAULT 0 NOT NULL;