From: Jan Schneider Date: Wed, 26 Jan 2011 21:04:58 +0000 (+0100) Subject: Convert Horde_History to migrations. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c0c18d9da665ed80cbfe207e7b5797b46e4f1afd;p=horde.git Convert Horde_History to migrations. --- diff --git a/framework/History/migration/Horde_History/1_horde_history_base_tables.php b/framework/History/migration/Horde_History/1_horde_history_base_tables.php new file mode 100644 index 000000000..a7394710b --- /dev/null +++ b/framework/History/migration/Horde_History/1_horde_history_base_tables.php @@ -0,0 +1,26 @@ +tables())) { + $t = $this->createTable('horde_histories', array('primaryKey' => array('history_id'))); + $t->column('history_id', 'integer', array('null' => false, 'unsigned' => true)); + $t->column('object_uid', 'string', array('limit' => 255, 'null' => false)); + $t->column('history_action', 'string', array('limit' => 32, 'null' => false)); + $t->column('history_ts', 'bigint', array('null' => false)); + $t->column('history_desc', 'text'); + $t->column('history_who', 'string', array('limit' => 255)); + $t->column('history_extra', 'text'); + $t->end(); + $this->addIndex('horde_histories', array('history_action')); + $this->addIndex('horde_histories', array('history_ts')); + $this->addIndex('horde_histories', array('object_uid')); + } + } + + public function down() + { + $this->dropTable('horde_histories'); + } +} diff --git a/framework/History/package.xml b/framework/History/package.xml index 05880d948..d5340e8ee 100644 --- a/framework/History/package.xml +++ b/framework/History/package.xml @@ -1,5 +1,5 @@ - + History pear.horde.org API for tracking the history of an object. @@ -10,8 +10,8 @@ chuck@horde.org yes - 2010-04-27 - + 2011-01-26 + 0.1.0 0.1.0 @@ -38,6 +38,11 @@ + + + + + @@ -78,6 +83,7 @@ + @@ -123,7 +129,7 @@ Converted to package.xml 2.0 for pear.horde.org beta beta - 2010-04-27 + 2011-01-26 LGPL * Initial Horde 4 package. diff --git a/horde/scripts/sql/horde_histories.mssql.sql b/horde/scripts/sql/horde_histories.mssql.sql deleted file mode 100644 index d390052cf..000000000 --- a/horde/scripts/sql/horde_histories.mssql.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE horde_histories ( - history_id INT UNSIGNED NOT NULL, - object_uid VARCHAR(255) NOT NULL, - history_action VARCHAR(32) NOT NULL, - history_ts BIGINT NOT NULL, - history_desc VARCHAR(MAX), - history_who VARCHAR(255), - history_extra VARCHAR(MAX), --- - PRIMARY KEY (history_id) -); - -CREATE INDEX history_action_idx ON horde_histories (history_action); -CREATE INDEX history_ts_idx ON horde_histories (history_ts); -CREATE INDEX history_uid_idx ON horde_histories (object_uid); diff --git a/horde/scripts/sql/horde_histories.sql b/horde/scripts/sql/horde_histories.sql deleted file mode 100644 index 3db506940..000000000 --- a/horde/scripts/sql/horde_histories.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE horde_histories ( - history_id INT UNSIGNED NOT NULL, - object_uid VARCHAR(255) NOT NULL, - history_action VARCHAR(32) NOT NULL, - history_ts BIGINT NOT NULL, - history_desc TEXT, - history_who VARCHAR(255), - history_extra TEXT, --- - PRIMARY KEY (history_id) -); - -CREATE INDEX history_action_idx ON horde_histories (history_action); -CREATE INDEX history_ts_idx ON horde_histories (history_ts); -CREATE INDEX history_uid_idx ON horde_histories (object_uid);