migrations for whups
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 4 Nov 2010 18:54:11 +0000 (14:54 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 4 Nov 2010 18:55:07 +0000 (14:55 -0400)
Still needs autoincrement for non-share tables once whups, itself is
migrated to Horde_Db.

20 files changed:
whups/migration/1_whups_base_tables.php [new file with mode: 0644]
whups/migration/2_whups_autoincrement_shares.php [new file with mode: 0644]
whups/scripts/sql/whups.mssql.sql [deleted file]
whups/scripts/sql/whups.oci8.sql [deleted file]
whups/scripts/sql/whups.sql [deleted file]
whups/scripts/sql/whups.xml [deleted file]
whups/scripts/upgrades/2006-07-12_add_due_date.sql [deleted file]
whups/scripts/upgrades/2006-08-04_drop_subjectlist.sql [deleted file]
whups/scripts/upgrades/2008-02-27_add_defaults.sql [deleted file]
whups/scripts/upgrades/2008-04-29_add_sql_share_tables.sql [deleted file]
whups/scripts/upgrades/2008-06-11_add_attribute_types.oci8.sql [deleted file]
whups/scripts/upgrades/2008-06-11_add_attribute_types.pgsql.sql [deleted file]
whups/scripts/upgrades/2008-06-11_add_attribute_types.sql [deleted file]
whups/scripts/upgrades/2008-06-13_add_queue_emails.sql [deleted file]
whups/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql [deleted file]
whups/scripts/upgrades/2008-06-24_add_replies.sql [deleted file]
whups/scripts/upgrades/2008-07-10_add_query_slugs.sql [deleted file]
whups/scripts/upgrades/2008-09-23_fix_group_uid.sql [deleted file]
whups/scripts/upgrades/2009-09-07_add_version_active.pgsql.sql [deleted file]
whups/scripts/upgrades/2009-09-07_add_version_active.sql [deleted file]

diff --git a/whups/migration/1_whups_base_tables.php b/whups/migration/1_whups_base_tables.php
new file mode 100644 (file)
index 0000000..9114b5d
--- /dev/null
@@ -0,0 +1,305 @@
+<?php
+/**
+ * Create whups base tables as of Whups 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  Whups
+ */
+class WhupsBaseTables extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $tableList = $this->tables();
+
+        if (!in_array('whups_tickets', $tableList)) {
+            $t = $this->createTable('whups_tickets', array('primaryKey' => false));
+            $t->column('ticket_id', 'integer', array('null' => false));
+            $t->column('ticket_summary', 'string', array('limit' => 255));
+            $t->column('user_id_requester', 'string', array('limit' => 255, 'null' => false));
+            $t->column('queue_id', 'integer', array('null' => false));
+            $t->column('version_id', 'integer');
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('state_id', 'integer', array('null' => false));
+            $t->column('priority_id', 'integer', array('null' => false));
+            $t->column('ticket_timestamp', 'integer', array('null' => false));
+            $t->column('ticket_due', 'integer');
+            $t->column('date_updated', 'integer');
+            $t->column('date_assigned', 'integer');
+            $t->column('date_resolved', 'integer');
+            $t->primaryKey(array('ticket_id'));
+            $t->end();
+
+            $this->addIndex('whups_tickets', array('queue_id'));
+            $this->addIndex('whups_tickets', array('state_id'));
+            $this->addIndex('whups_tickets', array('user_id_requester'));
+            $this->addIndex('whups_tickets', array('version_id'));
+            $this->addIndex('whups_tickets', array('priority_id'));
+        }
+
+        if (!in_array('whups_ticket_owners', $tableList)) {
+            $t = $this->createTable('whups_ticket_owners', array('primaryKey' => false));
+            $t->column('ticket_id', 'integer', array('null' => false));
+            $t->column('ticket_owner', 'string', array('null' => false, 'limit' => 255));
+            $t->primaryKey(array('ticket_id', 'ticket_owner'));
+            $t->end();
+
+            $this->addIndex('whups_ticket_owners', 'ticket_id');
+            $this->addIndex('whups_ticket_owners', 'ticket_owner');
+        }
+
+        if (!in_array('whups_guests', $tableList)) {
+            $t = $this->createTable('whups_guests', array('primaryKey' => false));
+            $t->column('guest_id', 'string', array('limit' => 255, 'null' => false));
+            $t->column('guest_email', 'string', array('limit' => 255, 'null' => false));
+            $t->primaryKey(array('guest_id'));
+            $t->end();
+        }
+
+        if (!in_array('whups_queues', $tableList)) {
+            $t = $this->createTable('whups_queues', array('primaryKey' => false));
+            $t->column('queue_id', 'integer', array('null' => false));
+            $t->column('queue_name', 'string', array('limit' => 64, 'null' => false));
+            $t->column('queue_description', 'string', array('limit' => 255));
+            $t->column('queue_versioned', 'smallint', array('default' => 0, 'null' => false));
+            $t->column('queue_slug', 'text', array('limit' => 64));
+            $t->column('queue_email', 'text', array('limit' => 64));
+            $t->primaryKey(array('queue_id'));
+            $t->end();
+        }
+
+        if (!in_array('whups_queues_users', $tableList)) {
+            $t = $this->createTable('whups_queues_users', array('primaryKey' => false));
+            $t->column('queue_id', 'integer', array('null' => false));
+            $t->column('user_uid', 'string', array('limit' => 250, 'null' => false));
+            $t->primaryKey(array('queue_id', 'user_uid'));
+            $t->end();
+        }
+
+        if (!in_array('whups_types', $tableList)) {
+            $t = $this->createTable('whups_types', array('primaryKey' => false));
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('type_name', 'string', array('limit' => 64, 'null' => false));
+            $t->column('type_description', 'string', array('limit' => 255));
+            $t->primaryKey(array('type_id'));
+            $t->end();
+        }
+
+        if (!in_array('whups_types_queues', $tableList)) {
+            $t = $this->createTable('whups_types_queues', array('primaryKey' => false));
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('queue_id', 'integer', array('null' => false));
+            $t->column('type_default', 'smallint', array('null' => false, 'default' => 0));
+            $t->end();
+
+            $this->addIndex('whups_types_queues', array('queue_id', 'type_id'));
+        }
+
+        if (!in_array('whups_states', $tableList)) {
+            $t = $this->createTable('whups_states', array('primaryKey' => false));
+            $t->column('state_id', 'integer', array('null' => false));
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('state_name', 'string', array('limit' => 64, 'null' => false));
+            $t->column('state_description', 'string', array('limit' => 255));
+            $t->column('state_category', 'string', array('limit' => 16));
+            $t->column('state_default', 'smallint', array('default' => 0, 'null' => false));
+            $t->primaryKey(array('state_id'));
+            $t->end();
+
+            $this->addIndex('whups_states', array('type_id'));
+            $this->addIndex('whups_states', array('state_category'));
+        }
+
+        if (!in_array('whups_replies', $tableList)) {
+            $t = $this->createTable('whups_replies', array('primaryKey' => false));
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('reply_id', 'integer', array('null' => false));
+            $t->column('reply_name', 'string', array('limit' => 255, 'null' => false));
+            $t->column('reply_text', 'text', array('null' => false));
+            $t->primaryKey(array('reply_id'));
+            $t->end();
+
+            $this->addIndex('whups_replies', array('type_id'));
+            $this->addIndex('whups_replies', array('reply_name'));
+        }
+
+        if (!in_array('whups_attributes_desc', $tableList)) {
+            $t = $this->createTable('whups_attributes_desc', array('primaryKey' => false));
+            $t->column('attribute_id', 'integer', array('null' => false));
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('attribute_name', 'string', array('null' => false, 'limit' => 64));
+            $t->column('attribute_description', 'string', array('null' => false, 'limit' => 255));
+            $t->column('attribute_type', 'string', array('default' => 'text', 'null' => false, 'limit' => 255));
+            $t->column('attribute_params', 'text');
+            $t->column('attribute_required', 'smallint');
+            $t->primaryKey(array('attribute_id'));
+            $t->end();
+        }
+
+        if (!in_array('whups_attributes', $tableList)) {
+            $t = $this->createTable('whups_attributes', array('primaryKey' => false));
+            $t->column('ticket_id', 'integer', array('null' => false));
+            $t->column('attribute_id', 'integer', array('null' => false));
+            $t->column('attribute_value', 'string', array('limit' => 255));
+            $t->end();
+        }
+
+        if (!in_array('whups_comments', $tableList)) {
+            $t = $this->createTable('whups_comments', array('primaryKey' => false));
+            $t->column('comment_id', 'integer', array('null' => false));
+            $t->column('ticket_id', 'integer', array('null' => false));
+            $t->column('user_id_creator', 'string', array('limit' => 255, 'null' => false));
+            $t->column('comment_text', 'text');
+            $t->column('comment_timestamp', 'integer');
+            $t->primaryKey(array('comment_id'));
+            $t->end();
+
+            $this->addIndex('whups_comments', array('ticket_id'));
+        }
+
+        if (!in_array('whups_logs', $tableList)) {
+            $t = $this->createTable('whups_logs', array('primaryKey' => false));
+            $t->column('log_id', 'integer', array('null' => false));
+            $t->column('transaction_id', 'integer', array('null' => false));
+            $t->column('ticket_id', 'integer', array('null' => false));
+            $t->column('log_timestamp', 'integer', array('null' => false));
+            $t->column('log_type', 'string', array('limit' => 255, 'null' => false));
+            $t->column('log_value', 'string', array('null' => false));
+            $t->column('log_value_num', 'integer');
+            $t->column('user_id', 'string', array('limit' => 255, 'null' => false));
+            $t->primaryKey(array('log_id'));
+            $t->end();
+
+            $this->addIndex('whups_logs', array('transaction_id'));
+            $this->addIndex('whups_logs', array('ticket_id'));
+            $this->addIndex('whups_logs', array('log_timestamp'));
+        }
+
+        if (!in_array('whups_priorities', $tableList)) {
+            $t = $this->createTable('whups_priorities', array('primaryKey' => false));
+            $t->column('priority_id', 'integer', array('null' => false));
+            $t->column('type_id', 'integer', array('null' => false));
+            $t->column('priority_name', 'string', array('limit' => 64));
+            $t->column('priority_description', 'string', array('limit' => 255));
+            $t->column('priority_default', 'smallint', array('defalut' => 0, 'null' => false));
+            $t->primaryKey(array('priority_id'));
+            $t->end();
+
+            $this->addIndex('whups_priorities', array('type_id'));
+        }
+
+        if (!in_array('whups_versions', $tableList)) {
+            $t = $this->createTable('whups_versions', array('primaryKey' => false));
+            $t->column('version_id', 'integer', array('null' => false));
+            $t->column('queue_id', 'integer', array('null' => false));
+            $t->column('version_name', 'string', array('limit' => 64));
+            $t->column('version_description', 'string', array('limit' => 255));
+            $t->column('version_active', 'integer', array('default' => 1));
+            $t->primaryKey(array('version_id'));
+            $t->end();
+
+            $this->addIndex('whups_versions', array('version_active'));
+        }
+
+        if (!in_array('whups_ticket_listeners', $tableList)) {
+            $t = $this->createTable('whups_ticket_listeners', array('primaryKey' => false));
+            $t->column('ticket_id', 'integer', array('null' => false));
+            $t->column('user_uid', 'string', array('limit' => 255, 'null' => false));
+            $t->end();
+
+            $this->addIndex('whups_ticket_listeners', array('ticket_id'));
+        }
+
+        if (!in_array('whups_queries', $tableList)) {
+            $t = $this->createTable('whups_queries', array('primaryKey' => false));
+            $t->column('query_id', 'integer', array('null' => false));
+            $t->column('query_parameters', 'text');
+            $t->column('query_object', 'text');
+            $t->primaryKey(array('query_id'));
+            $t->end();
+        }
+
+        if (!in_array('whups_shares', $tableList)) {
+            $t = $this->createTable('whups_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', 'smallint', array('default' => 0, 'null' => false));
+            $t->column('perm_creator', 'smallint', array('default' => 0, 'null' => false));
+            $t->column('perm_default', 'smallint', array('default' => 0, 'null' => false));
+            $t->column('perm_guest', 'smallint', array('default' => 0, 'null' => false));
+            $t->column('attribute_name', 'string', array('limit' => 255, 'null' => false));
+            $t->column('attribute_slug', 'string', array('limit' => 255));
+            $t->primaryKey(array('share_id'));
+            $t->end();
+
+            $this->addIndex('whups_shares', array('share_name'));
+            $this->addIndex('whups_shares', array('share_owner'));
+            $this->addIndex('whups_shares', array('perm_creator'));
+            $this->addIndex('whups_shares', array('perm_default'));
+            $this->addIndex('whups_shares', array('perm_guest'));
+        }
+
+        if (!in_array('whups_shares_groups', $tableList)) {
+            $t = $this->createTable('whups_shares_groups');
+            $t->column('share_id', 'integer', array('null' => false));
+            $t->column('group_uid', 'string', array('limit' => 255, 'null' => false));
+            $t->column('perm', 'smallint', array('null' => false));
+            $t->end();
+
+            $this->addIndex('whups_shares_groups', array('share_id'));
+            $this->addIndex('whups_shares_groups', array('group_uid'));
+            $this->addIndex('whups_shares_groups', array('perm'));
+        }
+
+        if (!in_array('whups_shares_users', $tableList)) {
+            $t = $this->createTable('whups_shares_users');
+
+            $t->column('share_id', 'integer', array('null' => false));
+            $t->column('user_uid', 'string', array('limit' => 255));
+            $t->column('perm', 'smallint', array('null' => false));
+            $t->end();
+
+            $this->addIndex('whups_shares_users', array('share_id'));
+            $this->addIndex('whups_shares_users', array('user_uid'));
+            $this->addIndex('whups_shares_users', array('perm'));
+        }
+    }
+
+    /**
+     * Downgrade to 0
+     */
+    public function down()
+    {
+        $this->dropTable('whups_tickets');
+        $this->dropTable('whups_ticket_owners');
+        $this->dropTable('whups_guests');
+        $this->dropTable('whups_queues');
+        $this->dropTable('whups_queues_users');
+        $this->dropTable('whups_types');
+        $this->dropTable('whups_types_queues');
+        $this->dropTable('whups_states');
+        $this->dropTable('whups_replies');
+        $this->dropTable('whups_attributes_desc');
+        $this->dropTable('whups_attributes');
+        $this->dropTable('whups_comments');
+        $this->dropTable('whups_logs');
+        $this->dropTable('whups_priorities');
+        $this->dropTable('whups_versions');
+        $this->dropTable('whups_ticket_listeners');
+        $this->dropTable('whups_queries');
+        $this->dropTable('whups_shares');
+        $this->dropTable('whups_shares_groups');
+        $this->dropTable('whups_shares_users');
+    }
+
+}
\ No newline at end of file
diff --git a/whups/migration/2_whups_autoincrement_shares.php b/whups/migration/2_whups_autoincrement_shares.php
new file mode 100644 (file)
index 0000000..43d4f95
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Change columns to autoincrement.
+ *
+ * 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  Whups
+ */
+class WhupsAutoIncrementShares extends Horde_Db_Migration_Base
+{
+    /**
+     * Upgrade.
+     */
+    public function up()
+    {
+        $this->changeColumn('whups_shares', 'share_id', 'integer', array('null' => false, 'autoincrement' => true));
+    }
+
+    /**
+     * Downgrade
+     */
+    public function down()
+    {
+        $this->changeColumn('whups_shares', 'share_id', 'integer', array('null' => false));
+    }
+}
diff --git a/whups/scripts/sql/whups.mssql.sql b/whups/scripts/sql/whups.mssql.sql
deleted file mode 100644 (file)
index b6496bc..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
---
--- Copyright 2001-2005 Robert E. Coyle <robertecoyle@hotmail.com>
---
--- See the enclosed file LICENSE for license information (BSD). If you
--- did not receive this file, see http://www.horde.org/licenses/bsdl.php.
---
--- Database definitions for Whups
-
-CREATE TABLE whups_tickets (
-    ticket_id           INT NOT NULL,          -- unique ticket id
-    ticket_summary      VARCHAR(255),          -- summary of the ticket
-    user_id_requester   VARCHAR(255) NOT NULL, -- user id of the creator of this ticket
-    queue_id            INT NOT NULL,          -- queue id that this ticket refers to
-    version_id          INT,                   -- version id that this ticket refers to
-    type_id             INT NOT NULL,          -- id into the type table, describing the type of ticket
-    state_id            INT NOT NULL,          -- state of this ticket, meaning depends on the type of the ticket
-    priority_id         INT NOT NULL,          -- priority, meaning depends on the type of the ticket
-    ticket_timestamp    INT NOT NULL,          -- redundant but useful, mirrored in the comment and log
-    ticket_due          INT,                   -- optional ticket due date
-    date_updated        INT,                   -- date of last update
-    date_assigned       INT,                   -- date of assignment
-    date_resolved       INT,                   -- date of resolving
---
-    PRIMARY KEY (ticket_id)
-);
-CREATE INDEX whups_ticket_queue_idx ON whups_tickets (queue_id);
-CREATE INDEX whups_ticket_state_idx ON whups_tickets (state_id);
-CREATE INDEX whups_ticket_requester_idx ON whups_tickets (user_id_requester);
-CREATE INDEX whups_ticket_version_idx ON whups_tickets (version_id);
-CREATE INDEX whups_ticket_priority_idx ON whups_tickets (priority_id);
-
-CREATE TABLE whups_ticket_owners (
-    ticket_id           INT NOT NULL,
-    ticket_owner        VARCHAR(255) NOT NULL
---
-    PRIMARY KEY (ticket_id, ticket_owner)
-);
-CREATE INDEX whups_ticket_owner_ticket_idx ON whups_ticket_owners (ticket_id);
-CREATE INDEX whups_ticket_owner_owner_idx ON whups_ticket_owners (ticket_owner);
-
-CREATE TABLE whups_guests (
-    guest_id            VARCHAR(255) NOT NULL,
-    guest_email         VARCHAR(255) NOT NULL,
---
-    PRIMARY KEY (guest_id)
-);
-
-CREATE TABLE whups_queues (
-    queue_id            INT NOT NULL,
-    queue_name          VARCHAR(64) NOT NULL,
-    queue_description   VARCHAR(255),
-    queue_versioned     SMALLINT DEFAULT 0 NOT NULL,
-    queue_slug          VARCHAR(64),
-    queue_email         VARCHAR(64),
---
-    PRIMARY KEY (queue_id)
-);
-
-CREATE TABLE whups_queues_users (
-    queue_id            INT NOT NULL,
-    user_uid            VARCHAR(250) NOT NULL,
---
-    PRIMARY KEY (queue_id, user_uid)
-);
-
-CREATE TABLE whups_types (
-    type_id             INT NOT NULL,
-    type_name           VARCHAR(64) NOT NULL,
-    type_description    VARCHAR(255),
---
-    PRIMARY KEY (type_id)
-);
-
-CREATE TABLE whups_types_queues (
-    type_id             INT NOT NULL,
-    queue_id            INT NOT NULL,
-    type_default        SMALLINT DEFAULT 0 NOT NULL
-);
-CREATE INDEX whups_type_queue_idx ON whups_types_queues (queue_id, type_id);
-
-CREATE TABLE whups_states (
-    state_id            INT NOT NULL,
-    type_id             INT NOT NULL,
-    state_name          VARCHAR(64) NOT NULL,
-    state_description   VARCHAR(255),
-    state_category      VARCHAR(16),
-    state_default       SMALLINT DEFAULT 0 NOT NULL,
---
-    PRIMARY KEY (state_id)
-);
-CREATE INDEX whups_state_type_idx ON whups_states (type_id);
-CREATE INDEX whups_state_category_idx ON whups_states (state_category);
-
-CREATE TABLE whups_replies (
-    type_id             INT NOT NULL,
-    reply_id            INT NOT NULL,
-    reply_name          VARCHAR(255) NOT NULL,
-    reply_text          VARCHAR(MAX) NOT NULL,
---
-    PRIMARY KEY (reply_id)
-);
-CREATE INDEX whups_reply_type_idx ON whups_replies (type_id);
-CREATE INDEX whups_reply_name_idx ON whups_replies (reply_name);
-
-CREATE TABLE whups_attributes_desc (
-    attribute_id          INT NOT NULL,
-    type_id               INT NOT NULL,
-    attribute_name        VARCHAR(64) NOT NULL,
-    attribute_description VARCHAR(255),
-    attribute_type        VARCHAR(255) DEFAULT 'text' NOT NULL,
-    attribute_params      VARCHAR(MAX),
-    attribute_required    SMALLINT,
---
-    PRIMARY KEY (attribute_id)
-);
-
-CREATE TABLE whups_attributes (
-    ticket_id           INT NOT NULL,
-    attribute_id        INT NOT NULL,
-    attribute_value     VARCHAR(255)
-);
-
-CREATE TABLE whups_comments (
-    comment_id          INT NOT NULL,
-    ticket_id           INT NOT NULL,
-    user_id_creator     VARCHAR(255) NOT NULL,
-    comment_text        VARCHAR(MAX),
-    comment_timestamp   INT,
---
-    PRIMARY KEY (comment_id)
-);
-CREATE INDEX whups_comment_ticket_idx ON whups_comments (ticket_id);
-
-CREATE TABLE whups_logs (
-    log_id              INT NOT NULL,
-    transaction_id      INT NOT NULL,
-    ticket_id           INT NOT NULL,
-    log_timestamp       INT NOT NULL,
-    log_type            VARCHAR(255) NOT NULL,
-    log_value           VARCHAR(255),
-    log_value_num       INT,
-    user_id             VARCHAR(255) NOT NULL,
---
-    PRIMARY KEY (log_id)
-);
-
-CREATE INDEX whups_log_transaction_idx ON whups_logs (transaction_id);
-CREATE INDEX whups_log_ticket_id_idx ON whups_logs (ticket_id);
-CREATE INDEX whups_log_timestamp_idx ON whups_logs (log_timestamp);
-
-CREATE TABLE whups_priorities (
-    priority_id           INT NOT NULL,
-    type_id               INT NOT NULL,
-    priority_name         VARCHAR(64),
-    priority_description  VARCHAR(255),
-    priority_default      SMALLINT DEFAULT 0 NOT NULL,
---
-    PRIMARY KEY (priority_id)
-);
-
-CREATE TABLE whups_versions (
-    version_id          INT NOT NULL,
-    queue_id            INT NOT NULL,
-    version_name        VARCHAR(64),
-    version_description VARCHAR(255),
-    version_active      INT DEFAULT 1,
---
-    PRIMARY KEY (version_id)
-);
-CREATE INDEX whups_versions_active_idx ON whups_versions (version_active);
-
-CREATE TABLE whups_ticket_listeners (
-    ticket_id           INT NOT NULL,
-    user_uid            VARCHAR(255) NOT NULL
-);
-CREATE INDEX whups_ticket_listeners_ticket_idx ON whups_ticket_listeners (ticket_id);
-
-CREATE TABLE whups_queries (
-    query_id            INT NOT NULL,
-    query_parameters    VARCHAR(MAX),
-    query_object        VARCHAR(MAX),
---
-    PRIMARY KEY (query_id)
-);
-
-CREATE TABLE whups_shares (
-    share_id INT NOT NULL,
-    share_name VARCHAR(255) NOT NULL,
-    share_owner VARCHAR(255) 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_slug VARCHAR(255),
---
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX whups_shares_share_name_idx ON whups_shares (share_name);
-CREATE INDEX whups_shares_share_owner_idx ON whups_shares (share_owner);
-CREATE INDEX whups_shares_perm_creator_idx ON whups_shares (perm_creator);
-CREATE INDEX whups_shares_perm_default_idx ON whups_shares (perm_default);
-CREATE INDEX whups_shares_perm_guest_idx ON whups_shares (perm_guest);
-
-CREATE TABLE whups_shares_groups (
-    share_id INT NOT NULL,
-    group_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX whups_shares_groups_share_id_idx ON whups_shares_groups (share_id);
-CREATE INDEX whups_shares_groups_group_uid_idx ON whups_shares_groups (group_uid);
-CREATE INDEX whups_shares_groups_perm_idx ON whups_shares_groups (perm);
-
-CREATE TABLE whups_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX whups_shares_users_share_id_idx ON whups_shares_users (share_id);
-CREATE INDEX whups_shares_users_user_uid_idx ON whups_shares_users (user_uid);
-CREATE INDEX whups_shares_users_perm_idx ON whups_shares_users (perm);
diff --git a/whups/scripts/sql/whups.oci8.sql b/whups/scripts/sql/whups.oci8.sql
deleted file mode 100644 (file)
index 2247822..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
---
--- Copyright 2001-2005 Robert E. Coyle <robertecoyle@hotmail.com>
---
--- See the enclosed file LICENSE for license information (BSD). If you
--- did not receive this file, see http://www.horde.org/licenses/bsdl.php.
---
--- Database definitions for Whups
-
-CREATE TABLE whups_tickets (
-    ticket_id           NUMBER(16) NOT NULL,          -- unique ticket id
-    ticket_summary      VARCHAR2(255),                -- summary of the ticket
-    user_id_requester   VARCHAR2(255) NOT NULL,       -- user id of the creator of this ticket
-    queue_id            NUMBER(16) NOT NULL,          -- queue id that this ticket refers to
-    version_id          NUMBER(16),                   -- version id that this ticket refers to
-    type_id             NUMBER(16) NOT NULL,          -- id into the type table, describing the type of ticket
-    state_id            NUMBER(16) NOT NULL,          -- state of this ticket, meaning depends on the type of the ticket
-    priority_id         NUMBER(16) NOT NULL,          -- priority, meaning depends on the type of the ticket
-    ticket_timestamp    NUMBER(16) NOT NULL,          -- redundant but useful, mirrored in the comment and log
-    ticket_due          NUMBER(16),                   -- optional ticket due date
-    date_updated        NUMBER(16),                   -- date of last update
-    date_assigned       NUMBER(16),                   -- date of assignment
-    date_resolved       NUMBER(16),                   -- date of resolving
---
-    PRIMARY KEY (ticket_id)
-);
-CREATE INDEX whups_ticket_queue_idx ON whups_tickets (queue_id);
-CREATE INDEX whups_ticket_state_idx ON whups_tickets (state_id);
-CREATE INDEX whups_ticket_requester_idx ON whups_tickets (user_id_requester);
-CREATE INDEX whups_ticket_version_idx ON whups_tickets (version_id);
-CREATE INDEX whups_ticket_priority_idx ON whups_tickets (priority_id);
-
-CREATE TABLE whups_ticket_owners (
-    ticket_id           NUMBER(16) NOT NULL,
-    ticket_owner        VARCHAR2(255) NOT NULL
---
-    PRIMARY KEY (ticket_id, ticket_owner)
-);
-CREATE INDEX whups_ticket_owner_ticket_idx ON whups_ticket_owners (ticket_id);
-CREATE INDEX whups_ticket_owner_owner_idx ON whups_ticket_owners (ticket_owner);
-
-CREATE TABLE whups_guests (
-    guest_id            VARCHAR2(255) NOT NULL,
-    guest_email         VARCHAR2(255) NOT NULL,
---
-    PRIMARY KEY (guest_id)
-);
-
-CREATE TABLE whups_queues (
-    queue_id            NUMBER(16) NOT NULL,
-    queue_name          VARCHAR2(64) NOT NULL,
-    queue_description   VARCHAR2(255),
-    queue_versioned     NUMBER(1) DEFAULT 0 NOT NULL,
-    queue_slug          VARCHAR2(64),
-    queue_email         VARCHAR2(64),
---
-    PRIMARY KEY (queue_id)
-);
-
-CREATE TABLE whups_queues_users (
-    queue_id            NUMBER(16) NOT NULL,
-    user_uid            VARCHAR2(255) NOT NULL,
---
-    PRIMARY KEY (queue_id, user_uid)
-);
-
-CREATE TABLE whups_types (
-    type_id             NUMBER(16) NOT NULL,
-    type_name           VARCHAR2(64) NOT NULL,
-    type_description    VARCHAR2(255),
---
-    PRIMARY KEY (type_id)
-);
-
-CREATE TABLE whups_types_queues (
-    type_id             NUMBER(16) NOT NULL,
-    queue_id            NUMBER(16) NOT NULL,
-    type_default        NUMBER(1) DEFAULT 0 NOT NULL
-);
-CREATE INDEX whups_type_queue_idx ON whups_types_queues (queue_id, type_id);
-
-CREATE TABLE whups_states (
-    state_id            NUMBER(16) NOT NULL,
-    type_id             NUMBER(16) NOT NULL,
-    state_name          VARCHAR2(64) NOT NULL,
-    state_description   VARCHAR2(255),
-    state_category      VARCHAR2(16),
-    state_default       NUMBER(1) DEFAULT 0 NOT NULL,
---
-    PRIMARY KEY (state_id)
-);
-CREATE INDEX whups_state_type_idx ON whups_states (type_id);
-CREATE INDEX whups_state_category_idx ON whups_states (state_category);
-
-CREATE TABLE whups_replies (
-    type_id             NUMBER(16) NOT NULL,
-    reply_id            NUMBER(16) NOT NULL,
-    reply_name          VARCHAR2(255) NOT NULL,
-    reply_text          CLOB NOT NULL,
---
-    PRIMARY KEY (reply_id)
-);
-CREATE INDEX whups_reply_type_idx ON whups_replies (type_id);
-CREATE INDEX whups_reply_name_idx ON whups_replies (reply_name);
-
-CREATE TABLE whups_attributes_desc (
-    attribute_id          NUMBER(16) NOT NULL,
-    type_id               NUMBER(16) NOT NULL,
-    attribute_name        VARCHAR2(64) NOT NULL,
-    attribute_description VARCHAR2(255),
-    attribute_type        VARCHAR2(255) DEFAULT 'text' NOT NULL,
-    attribute_params      CLOB,
-    attribute_required    NUMBER(8),
---
-    PRIMARY KEY (attribute_id)
-);
-
-CREATE TABLE whups_attributes (
-    ticket_id           NUMBER(16) NOT NULL,
-    attribute_id        NUMBER(16) NOT NULL,
-    attribute_value     VARCHAR2(255)
-);
-
-CREATE TABLE whups_comments (
-    comment_id          NUMBER(16) NOT NULL,
-    ticket_id           NUMBER(16) NOT NULL,
-    user_id_creator     VARCHAR2(255) NOT NULL,
-    comment_text        CLOB,
-    comment_timestamp   NUMBER(16),
---
-    PRIMARY KEY (comment_id)
-);
-CREATE INDEX whups_comment_ticket_idx ON whups_comments (ticket_id);
-
-CREATE TABLE whups_logs (
-    log_id              NUMBER(16) NOT NULL,
-    transaction_id      NUMBER(16) NOT NULL,
-    ticket_id           NUMBER(16) NOT NULL,
-    log_timestamp       NUMBER(16) NOT NULL,
-    log_type            VARCHAR2(255) NOT NULL,
-    log_value           VARCHAR2(255),
-    log_value_num       NUMBER(16),
-    user_id             VARCHAR2(255) NOT NULL,
---
-    PRIMARY KEY (log_id)
-);
-
-CREATE INDEX whups_log_transaction_idx ON whups_logs (transaction_id);
-CREATE INDEX whups_log_ticket_id_idx ON whups_logs (ticket_id);
-CREATE INDEX whups_log_timestamp_idx ON whups_logs (log_timestamp);
-
-CREATE TABLE whups_priorities (
-    priority_id           NUMBER(16) NOT NULL,
-    type_id               NUMBER(16) NOT NULL,
-    priority_name         VARCHAR2(64),
-    priority_description  VARCHAR2(255),
-    priority_default      NUMBER(1) DEFAULT 0 NOT NULL,
---
-    PRIMARY KEY (priority_id)
-);
-
-CREATE TABLE whups_versions (
-    version_id          NUMBER(16) NOT NULL,
-    queue_id            NUMBER(16) NOT NULL,
-    version_name        VARCHAR2(64),
-    version_description VARCHAR2(255),
-    version_active      NUMBER(1) DEFAULT 1,
---
-    PRIMARY KEY (version_id)
-);
-CREATE INDEX whups_versions_active_idx ON whups_versions (version_active);
-
-CREATE TABLE whups_ticket_listeners (
-    ticket_id           NUMBER(16) NOT NULL,
-    user_uid            VARCHAR2(255) NOT NULL
-);
-CREATE INDEX whups_ticket_listeners_ticket_idx ON whups_ticket_listeners (ticket_id);
-
-CREATE TABLE whups_queries (
-    query_id            NUMBER(16) NOT NULL,
-    query_parameters    CLOB,
-    query_object        CLOB,
---
-    PRIMARY KEY (query_id)
-);
-
-CREATE TABLE whups_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_slug VARCHAR2(255),
---
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX whups_shares_share_name_idx ON whups_shares (share_name);
-CREATE INDEX whups_shares_share_owner_idx ON whups_shares (share_owner);
-CREATE INDEX whups_shares_perm_creator_idx ON whups_shares (perm_creator);
-CREATE INDEX whups_shares_perm_default_idx ON whups_shares (perm_default);
-CREATE INDEX whups_shares_perm_guest_idx ON whups_shares (perm_guest);
-
-CREATE TABLE whups_shares_groups (
-    share_id NUMBER(16) NOT NULL,
-    group_uid VARCHAR2(255) NOT NULL,
-    perm NUMBER(8) NOT NULL
-);
-
-CREATE INDEX whups_shares_groups_share_id_idx ON whups_shares_groups (share_id);
-CREATE INDEX whups_shares_groups_group_uid_idx ON whups_shares_groups (group_uid);
-CREATE INDEX whups_shares_groups_perm_idx ON whups_shares_groups (perm);
-
-CREATE TABLE whups_shares_users (
-    share_id NUMBER(16) NOT NULL,
-    user_uid VARCHAR2(255) NOT NULL,
-    perm NUMBER(8) NOT NULL
-);
-
-CREATE INDEX whups_shares_users_share_id_idx ON whups_shares_users (share_id);
-CREATE INDEX whups_shares_users_user_uid_idx ON whups_shares_users (user_uid);
-CREATE INDEX whups_shares_users_perm_idx ON whups_shares_users (perm);
diff --git a/whups/scripts/sql/whups.sql b/whups/scripts/sql/whups.sql
deleted file mode 100644 (file)
index ef474ab..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
---
--- Copyright 2001-2005 Robert E. Coyle <robertecoyle@hotmail.com>
---
--- See the enclosed file LICENSE for license information (BSD). If you
--- did not receive this file, see http://www.horde.org/licenses/bsdl.php.
---
--- Database definitions for Whups
-
-CREATE TABLE whups_tickets (
-    ticket_id           INT NOT NULL,          -- unique ticket id
-    ticket_summary      VARCHAR(255),          -- summary of the ticket
-    user_id_requester   VARCHAR(255) NOT NULL, -- user id of the creator of this ticket
-    queue_id            INT NOT NULL,          -- queue id that this ticket refers to
-    version_id          INT,                   -- version id that this ticket refers to
-    type_id             INT NOT NULL,          -- id into the type table, describing the type of ticket
-    state_id            INT NOT NULL,          -- state of this ticket, meaning depends on the type of the ticket
-    priority_id         INT NOT NULL,          -- priority, meaning depends on the type of the ticket
-    ticket_timestamp    INT NOT NULL,          -- redundant but useful, mirrored in the comment and log
-    ticket_due          INT,                   -- optional ticket due date
-    date_updated        INT,                   -- date of last update
-    date_assigned       INT,                   -- date of assignment
-    date_resolved       INT,                   -- date of resolving
---
-    PRIMARY KEY (ticket_id)
-);
-CREATE INDEX whups_ticket_queue_idx ON whups_tickets (queue_id);
-CREATE INDEX whups_ticket_state_idx ON whups_tickets (state_id);
-CREATE INDEX whups_ticket_requester_idx ON whups_tickets (user_id_requester);
-CREATE INDEX whups_ticket_version_idx ON whups_tickets (version_id);
-CREATE INDEX whups_ticket_priority_idx ON whups_tickets (priority_id);
-
-CREATE TABLE whups_ticket_owners (
-    ticket_id           INT NOT NULL,
-    ticket_owner        VARCHAR(255) NOT NULL,
---
-    PRIMARY KEY (ticket_id, ticket_owner)
-);
-CREATE INDEX whups_ticket_owner_ticket_idx ON whups_ticket_owners (ticket_id);
-CREATE INDEX whups_ticket_owner_owner_idx ON whups_ticket_owners (ticket_owner);
-
-CREATE TABLE whups_guests (
-    guest_id            VARCHAR(255) NOT NULL,
-    guest_email         VARCHAR(255) NOT NULL,
---
-    PRIMARY KEY (guest_id)
-);
-
-CREATE TABLE whups_queues (
-    queue_id            INT NOT NULL,
-    queue_name          VARCHAR(64) NOT NULL,
-    queue_description   VARCHAR(255),
-    queue_versioned     SMALLINT DEFAULT 0 NOT NULL,
-    queue_slug          VARCHAR(64),
-    queue_email         VARCHAR(64),
---
-    PRIMARY KEY (queue_id)
-);
-
-CREATE TABLE whups_queues_users (
-    queue_id            INT NOT NULL,
-    user_uid            VARCHAR(250) NOT NULL,
---
-    PRIMARY KEY (queue_id, user_uid)
-);
-
-CREATE TABLE whups_types (
-    type_id             INT NOT NULL,
-    type_name           VARCHAR(64) NOT NULL,
-    type_description    VARCHAR(255),
---
-    PRIMARY KEY (type_id)
-);
-
-CREATE TABLE whups_types_queues (
-    type_id             INT NOT NULL,
-    queue_id            INT NOT NULL,
-    type_default        SMALLINT DEFAULT 0 NOT NULL
-);
-CREATE INDEX whups_type_queue_idx ON whups_types_queues (queue_id, type_id);
-
-CREATE TABLE whups_states (
-    state_id            INT NOT NULL,
-    type_id             INT NOT NULL,
-    state_name          VARCHAR(64) NOT NULL,
-    state_description   VARCHAR(255),
-    state_category      VARCHAR(16),
-    state_default       SMALLINT DEFAULT 0 NOT NULL,
---
-    PRIMARY KEY (state_id)
-);
-CREATE INDEX whups_state_type_idx ON whups_states (type_id);
-CREATE INDEX whups_state_category_idx ON whups_states (state_category);
-
-CREATE TABLE whups_replies (
-    type_id             INT NOT NULL,
-    reply_id            INT NOT NULL,
-    reply_name          VARCHAR(255) NOT NULL,
-    reply_text          TEXT NOT NULL,
---
-    PRIMARY KEY (reply_id)
-);
-CREATE INDEX whups_reply_type_idx ON whups_replies (type_id);
-CREATE INDEX whups_reply_name_idx ON whups_replies (reply_name);
-
-CREATE TABLE whups_attributes_desc (
-    attribute_id          INT NOT NULL,
-    type_id               INT NOT NULL,
-    attribute_name        VARCHAR(64) NOT NULL,
-    attribute_description VARCHAR(255),
-    attribute_type        VARCHAR(255) DEFAULT 'text' NOT NULL,
-    attribute_params      TEXT,
-    attribute_required    SMALLINT,
---
-    PRIMARY KEY (attribute_id)
-);
-
-CREATE TABLE whups_attributes (
-    ticket_id           INT NOT NULL,
-    attribute_id        INT NOT NULL,
-    attribute_value     VARCHAR(255)
-);
-
-CREATE TABLE whups_comments (
-    comment_id          INT NOT NULL,
-    ticket_id           INT NOT NULL,
-    user_id_creator     VARCHAR(255) NOT NULL,
-    comment_text        TEXT,
-    comment_timestamp   INT,
---
-    PRIMARY KEY (comment_id)
-);
-CREATE INDEX whups_comment_ticket_idx ON whups_comments (ticket_id);
-
-CREATE TABLE whups_logs (
-    log_id              INT NOT NULL,
-    transaction_id      INT NOT NULL,
-    ticket_id           INT NOT NULL,
-    log_timestamp       INT NOT NULL,
-    log_type            VARCHAR(255) NOT NULL,
-    log_value           VARCHAR(255),
-    log_value_num       INT,
-    user_id             VARCHAR(255) NOT NULL,
---
-    PRIMARY KEY (log_id)
-);
-CREATE INDEX whups_log_transaction_idx ON whups_logs (transaction_id);
-CREATE INDEX whups_log_ticket_id_idx ON whups_logs (ticket_id);
-CREATE INDEX whups_log_timestamp_idx ON whups_logs (log_timestamp);
-
-CREATE TABLE whups_priorities (
-    priority_id           INT NOT NULL,
-    type_id               INT NOT NULL,
-    priority_name         VARCHAR(64),
-    priority_description  VARCHAR(255),
-    priority_default      SMALLINT DEFAULT 0 NOT NULL,
---
-    PRIMARY KEY (priority_id)
-);
-CREATE INDEX whups_priority_type_idx ON whups_priorities (type_id);
-
-CREATE TABLE whups_versions (
-    version_id          INT NOT NULL,
-    queue_id            INT NOT NULL,
-    version_name        VARCHAR(64),
-    version_description VARCHAR(255),
-    version_active      INT DEFAULT 1,
---
-    PRIMARY KEY (version_id)
-);
-CREATE INDEX whups_versions_active_idx ON whups_versions (version_active);
-
-CREATE TABLE whups_ticket_listeners (
-    ticket_id           INT NOT NULL,
-    user_uid            VARCHAR(255) NOT NULL
-);
-CREATE INDEX whups_ticket_listeners_ticket_idx ON whups_ticket_listeners (ticket_id);
-
-CREATE TABLE whups_queries (
-    query_id            INT NOT NULL,
-    query_parameters    TEXT,
-    query_object        TEXT,
---
-    PRIMARY KEY (query_id)
-);
-
-CREATE TABLE whups_shares (
-    share_id INT NOT NULL,
-    share_name VARCHAR(255) NOT NULL,
-    share_owner VARCHAR(255) 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_slug VARCHAR(255),
---
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX whups_shares_share_name_idx ON whups_shares (share_name);
-CREATE INDEX whups_shares_share_owner_idx ON whups_shares (share_owner);
-CREATE INDEX whups_shares_perm_creator_idx ON whups_shares (perm_creator);
-CREATE INDEX whups_shares_perm_default_idx ON whups_shares (perm_default);
-CREATE INDEX whups_shares_perm_guest_idx ON whups_shares (perm_guest);
-
-CREATE TABLE whups_shares_groups (
-    share_id INT NOT NULL,
-    group_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX whups_shares_groups_share_id_idx ON whups_shares_groups (share_id);
-CREATE INDEX whups_shares_groups_group_uid_idx ON whups_shares_groups (group_uid);
-CREATE INDEX whups_shares_groups_perm_idx ON whups_shares_groups (perm);
-
-CREATE TABLE whups_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX whups_shares_users_share_id_idx ON whups_shares_users (share_id);
-CREATE INDEX whups_shares_users_user_uid_idx ON whups_shares_users (user_uid);
-CREATE INDEX whups_shares_users_perm_idx ON whups_shares_users (perm);
diff --git a/whups/scripts/sql/whups.xml b/whups/scripts/sql/whups.xml
deleted file mode 100644 (file)
index 291106f..0000000
+++ /dev/null
@@ -1,1368 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<database>
-
- <name><variable>name</variable></name>
- <create>false</create>
- <overwrite>false</overwrite>
-
- <table>
-
-  <name>whups_attributes</name>
-
-  <declaration>
-
-   <field>
-    <name>ticket_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>attribute_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>attribute_value</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_attributes_desc</name>
-
-  <declaration>
-
-   <field>
-    <name>attribute_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>attribute_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>attribute_description</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>attribute_type</name>
-    <type>text</type>
-    <default>text</default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>attribute_required</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>attribute_params</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-   </field>
-
-   <index>
-    <name>whups_attributes_desc_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>attribute_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_comments</name>
-
-  <declaration>
-
-   <field>
-    <name>comment_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>ticket_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>user_id_creator</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>comment_text</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-   </field>
-
-   <field>
-    <name>comment_timestamp</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <index>
-    <name>whups_comment_ticket</name>
-    <field>
-     <name>ticket_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_comments_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>comment_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_guests</name>
-
-  <declaration>
-
-   <field>
-    <name>guest_id</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>guest_email</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <index>
-    <name>whups_guests_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>guest_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_logs</name>
-
-  <declaration>
-
-   <field>
-    <name>ticket_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>log_timestamp</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>user_id</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>log_type</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>log_value</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>log_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>transaction_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>log_value_num</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <index>
-    <name>log_ticket_id</name>
-    <field>
-     <name>ticket_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>log_timestamp</name>
-    <field>
-     <name>log_timestamp</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_priorities</name>
-
-  <declaration>
-
-   <field>
-    <name>priority_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>priority_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>priority_description</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>priority_default</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <index>
-    <name>whups_priority_type</name>
-    <field>
-     <name>type_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_priorities_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>priority_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_queries</name>
-
-  <declaration>
-
-   <field>
-    <name>query_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>query_parameters</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-   </field>
-
-   <field>
-    <name>query_object</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-   </field>
-
-   <index>
-    <name>whups_queries_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>query_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_queues</name>
-
-  <declaration>
-
-   <field>
-    <name>queue_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>queue_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>queue_description</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>queue_versioned</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <field>
-    <name>queue_slug</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>queue_email</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>64</length>
-   </field>
-
-   <index>
-    <name>whups_queue_slug</name>
-    <field>
-     <name>queue_slug</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_queues_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>queue_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_queues_users</name>
-
-  <declaration>
-
-   <field>
-    <name>queue_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>user_uid</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>250</length>
-   </field>
-
-   <index>
-    <name>whups_queues_users_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>queue_id</name>
-     <sorting>ascending</sorting>
-    </field>
-    <field>
-     <name>user_uid</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_replies</name>
-
-  <declaration>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>reply_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>reply_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>reply_text</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-   </field>
-
-   <index>
-    <name>whups_reply_type</name>
-    <field>
-     <name>type_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_reply_name</name>
-    <field>
-     <name>reply_name</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_replies_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>reply_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_shares</name>
-
-  <declaration>
-
-   <field>
-    <name>share_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>share_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>share_owner</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>32</length>
-   </field>
-
-   <field>
-    <name>share_flags</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <field>
-    <name>perm_creator</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <field>
-    <name>perm_default</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <field>
-    <name>perm_guest</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <field>
-    <name>attribute_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>attribute_slug</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <index>
-    <name>whups_shares_share_name</name>
-    <field>
-     <name>share_name</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_share_owner</name>
-    <field>
-     <name>share_owner</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_perm_creator</name>
-    <field>
-     <name>perm_creator</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_perm_default</name>
-    <field>
-     <name>perm_default</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_perm_guest</name>
-    <field>
-     <name>perm_guest</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>share_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_shares_groups</name>
-
-  <declaration>
-
-   <field>
-    <name>share_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>group_uid</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>perm</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <index>
-    <name>whups_shares_groups_share_id</name>
-    <field>
-     <name>share_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_groups_group_uid</name>
-    <field>
-     <name>group_uid</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_groups_perm</name>
-    <field>
-     <name>perm</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_shares_users</name>
-
-  <declaration>
-
-   <field>
-    <name>share_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>user_uid</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>32</length>
-   </field>
-
-   <field>
-    <name>perm</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <index>
-    <name>whups_shares_users_share_id</name>
-    <field>
-     <name>share_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_users_user_uid</name>
-    <field>
-     <name>user_uid</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_shares_users_perm</name>
-    <field>
-     <name>perm</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_states</name>
-
-  <declaration>
-
-   <field>
-    <name>state_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>state_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>state_description</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>state_category</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>16</length>
-   </field>
-
-   <field>
-    <name>state_default</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <index>
-    <name>whups_state_type</name>
-    <field>
-     <name>type_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_state_category</name>
-    <field>
-     <name>state_category</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_states_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>state_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_ticket_listeners</name>
-
-  <declaration>
-
-   <field>
-    <name>ticket_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>user_uid</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <index>
-    <name>whups_ticket_listeners_ticket</name>
-    <field>
-     <name>ticket_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_ticket_owners</name>
-
-  <declaration>
-
-   <field>
-    <name>ticket_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>ticket_owner</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <index>
-    <name>ticket_id</name>
-    <field>
-     <name>ticket_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>ticket_owner</name>
-    <field>
-     <name>ticket_owner</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_ticket_owner_ticket</name>
-    <field>
-     <name>ticket_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_ticket_owner_owner</name>
-    <field>
-     <name>ticket_owner</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_tickets</name>
-
-  <declaration>
-
-   <field>
-    <name>ticket_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>ticket_summary</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>user_id_requester</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>queue_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>version_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>state_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>priority_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>ticket_timestamp</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>ticket_due</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>date_updated</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>date_assigned</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>date_resolved</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>4</length>
-   </field>
-
-   <index>
-    <name>whups_ticket_queue</name>
-    <field>
-     <name>queue_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_ticket_state</name>
-    <field>
-     <name>state_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_ticket_requester</name>
-    <field>
-     <name>user_id_requester</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_ticket_version</name>
-    <field>
-     <name>version_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_ticket_priority</name>
-    <field>
-     <name>priority_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_tickets_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>ticket_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_types</name>
-
-  <declaration>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>type_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>type_description</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <index>
-    <name>whups_types_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>type_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_types_queues</name>
-
-  <declaration>
-
-   <field>
-    <name>type_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>queue_id</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>type_default</name>
-    <type>integer</type>
-    <default>0</default>
-    <notnull>true</notnull>
-    <length>2</length>
-   </field>
-
-   <index>
-    <name>whups_type_queue</name>
-    <field>
-     <name>queue_id</name>
-     <sorting>ascending</sorting>
-    </field>
-    <field>
-     <name>type_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_users_queries</name>
-
-  <declaration>
-
-   <field>
-    <name>user_uid</name>
-    <type>text</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>query_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>query_object</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-   </field>
-
-  </declaration>
-
- </table>
-
- <table>
-
-  <name>whups_versions</name>
-
-  <declaration>
-
-   <field>
-    <name>version_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>queue_id</name>
-    <type>integer</type>
-    <default></default>
-    <notnull>true</notnull>
-    <length>4</length>
-   </field>
-
-   <field>
-    <name>version_name</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>64</length>
-   </field>
-
-   <field>
-    <name>version_description</name>
-    <type>text</type>
-    <default></default>
-    <notnull>false</notnull>
-    <length>255</length>
-   </field>
-
-   <field>
-    <name>version_active</name>
-    <type>integer</type>
-    <default>1</default>
-    <length>1</length>
-   </field>
-
-   <index>
-    <name>whups_versions_pKey</name>
-    <primary>true</primary>
-    <field>
-     <name>version_id</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-   <index>
-    <name>whups_versions_active</name>
-    <field>
-     <name>version_active</name>
-     <sorting>ascending</sorting>
-    </field>
-   </index>
-
-  </declaration>
-
- </table>
-
-</database>
diff --git a/whups/scripts/upgrades/2006-07-12_add_due_date.sql b/whups/scripts/upgrades/2006-07-12_add_due_date.sql
deleted file mode 100644 (file)
index 131ebe6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
--- Script to add due date to whups_tickets table
-
-ALTER TABLE whups_tickets ADD ticket_due INT;
diff --git a/whups/scripts/upgrades/2006-08-04_drop_subjectlist.sql b/whups/scripts/upgrades/2006-08-04_drop_subjectlist.sql
deleted file mode 100644 (file)
index 840c8a9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-DROP TABLE whups_queues_subjects;
-DROP TABLE whups_subjects;
-ALTER TABLE whups_queues DROP COLUMN queue_subjectlist;
-DROP TABLE whups_subjects_seq;
diff --git a/whups/scripts/upgrades/2008-02-27_add_defaults.sql b/whups/scripts/upgrades/2008-02-27_add_defaults.sql
deleted file mode 100644 (file)
index e2408ae..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE whups_types_queues ADD COLUMN type_default SMALLINT DEFAULT 0 NOT NULL;
-ALTER TABLE whups_states ADD COLUMN state_default SMALLINT DEFAULT 0 NOT NULL;
-ALTER TABLE whups_priorities ADD COLUMN priority_default SMALLINT DEFAULT 0 NOT NULL;
diff --git a/whups/scripts/upgrades/2008-04-29_add_sql_share_tables.sql b/whups/scripts/upgrades/2008-04-29_add_sql_share_tables.sql
deleted file mode 100644 (file)
index 634a4bb..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-CREATE TABLE whups_shares (
-    share_id INT NOT NULL,
-    share_name VARCHAR(255) NOT NULL,
-    share_owner VARCHAR(255) 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,
-    PRIMARY KEY (share_id)
-);
-
-CREATE INDEX whups_shares_share_name_idx ON whups_shares (share_name);
-CREATE INDEX whups_shares_share_owner_idx ON whups_shares (share_owner);
-CREATE INDEX whups_shares_perm_creator_idx ON whups_shares (perm_creator);
-CREATE INDEX whups_shares_perm_default_idx ON whups_shares (perm_default);
-CREATE INDEX whups_shares_perm_guest_idx ON whups_shares (perm_guest);
-
-CREATE TABLE whups_shares_groups (
-    share_id INT NOT NULL,
-    group_uid INT NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX whups_shares_groups_share_id_idx ON whups_shares_groups (share_id);
-CREATE INDEX whups_shares_groups_group_uid_idx ON whups_shares_groups (group_uid);
-CREATE INDEX whups_shares_groups_perm_idx ON whups_shares_groups (perm);
-
-CREATE TABLE whups_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(32) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-
-CREATE INDEX whups_shares_users_share_id_idx ON whups_shares_users (share_id);
-CREATE INDEX whups_shares_users_user_uid_idx ON whups_shares_users (user_uid);
-CREATE INDEX whups_shares_users_perm_idx ON whups_shares_users (perm);
diff --git a/whups/scripts/upgrades/2008-06-11_add_attribute_types.oci8.sql b/whups/scripts/upgrades/2008-06-11_add_attribute_types.oci8.sql
deleted file mode 100644 (file)
index 7138887..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_description_new VARCHAR2(255);
-UPDATE whups_attributes_desc SET attribute_description_new = attribute_description;
-ALTER TABLE whups_attributes_desc DROP COLUMN attribute_description;
-ALTER TABLE whups_attributes_desc RENAME COLUMN attribute_description_new TO attribute_description;
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_type VARCHAR2(255) DEFAULT 'text';
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_params CLOB;
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_required NUMBER(8);
diff --git a/whups/scripts/upgrades/2008-06-11_add_attribute_types.pgsql.sql b/whups/scripts/upgrades/2008-06-11_add_attribute_types.pgsql.sql
deleted file mode 100644 (file)
index 1f9edc3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-BEGIN;
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_description_new VARCHAR(255);
-UPDATE whups_attributes_desc SET attribute_description_new = attribute_description;
-ALTER TABLE whups_attributes_desc DROP attribute_description;
-ALTER TABLE whups_attributes_desc RENAME attribute_description_new TO attribute_description;
-COMMIT;
-
-BEGIN;
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_type VARCHAR(255);
-ALTER TABLE whups_attributes_desc ALTER COLUMN attribute_type SET DEFAULT 'text';
-COMMIT;
-
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_params TEXT;
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_required SMALLINT;
diff --git a/whups/scripts/upgrades/2008-06-11_add_attribute_types.sql b/whups/scripts/upgrades/2008-06-11_add_attribute_types.sql
deleted file mode 100644 (file)
index 78b48f8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ALTER TABLE whups_attributes_desc CHANGE COLUMN attribute_description attribute_description VARCHAR(255);
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_type VARCHAR(255) DEFAULT 'text';
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_params TEXT;
-ALTER TABLE whups_attributes_desc ADD COLUMN attribute_required SMALLINT;
diff --git a/whups/scripts/upgrades/2008-06-13_add_queue_emails.sql b/whups/scripts/upgrades/2008-06-13_add_queue_emails.sql
deleted file mode 100644 (file)
index 325b184..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE whups_queues ADD COLUMN queue_email VARCHAR(64);
diff --git a/whups/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql b/whups/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql
deleted file mode 100644 (file)
index 48f6528..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE whups_shares CHANGE share_owner share_owner VARCHAR(255);
-ALTER TABLE whups_shares_users CHANGE user_uid user_uid VARCHAR(255);
\ No newline at end of file
diff --git a/whups/scripts/upgrades/2008-06-24_add_replies.sql b/whups/scripts/upgrades/2008-06-24_add_replies.sql
deleted file mode 100644 (file)
index b3bb7bd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CREATE TABLE whups_replies (
-    type_id             INT NOT NULL,
-    reply_id            INT NOT NULL,
-    reply_name          VARCHAR(255) NOT NULL,
-    reply_text          TEXT NOT NULL,
---
-    PRIMARY KEY (reply_id)
-);
-CREATE INDEX whups_reply_type_idx ON whups_replies (type_id);
-CREATE INDEX whups_reply_name_idx ON whups_replies (reply_name);
diff --git a/whups/scripts/upgrades/2008-07-10_add_query_slugs.sql b/whups/scripts/upgrades/2008-07-10_add_query_slugs.sql
deleted file mode 100644 (file)
index 524762f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE whups_shares ADD COLUMN attribute_slug VARCHAR(255);
diff --git a/whups/scripts/upgrades/2008-09-23_fix_group_uid.sql b/whups/scripts/upgrades/2008-09-23_fix_group_uid.sql
deleted file mode 100644 (file)
index 410d992..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE whups_shares_groups CHANGE group_uid group_uid VARCHAR(255);
-
diff --git a/whups/scripts/upgrades/2009-09-07_add_version_active.pgsql.sql b/whups/scripts/upgrades/2009-09-07_add_version_active.pgsql.sql
deleted file mode 100644 (file)
index 6de2a2f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ALTER TABLE whups_versions ADD COLUMN version_active INT;
-UPDATE whups_versions SET version_active = 1;
-ALTER TABLE whups_versions ALTER COLUMN version_active SET DEFAULT 1;
-CREATE INDEX whups_versions_active_idx ON whups_versions (version_active);
diff --git a/whups/scripts/upgrades/2009-09-07_add_version_active.sql b/whups/scripts/upgrades/2009-09-07_add_version_active.sql
deleted file mode 100644 (file)
index c192a1f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE whups_versions ADD COLUMN version_active INT DEFAULT 1;
-CREATE INDEX whups_versions_active_idx ON whups_versions (version_active);