From c7d79b9af570e160b908c93c767794a606a299b0 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 26 Jan 2011 21:39:03 +0100 Subject: [PATCH] Convert horde_cache to migrations. --- .../Horde_Cache/1_horde_cache_base_tables.php | 20 ++++++++++++++++++++ framework/Cache/package.xml | 12 +++++++++--- horde/scripts/sql/horde_cache.pgsql.sql | 8 -------- horde/scripts/sql/horde_cache.sql | 12 ------------ 4 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 framework/Cache/migration/Horde_Cache/1_horde_cache_base_tables.php delete mode 100644 horde/scripts/sql/horde_cache.pgsql.sql delete mode 100644 horde/scripts/sql/horde_cache.sql diff --git a/framework/Cache/migration/Horde_Cache/1_horde_cache_base_tables.php b/framework/Cache/migration/Horde_Cache/1_horde_cache_base_tables.php new file mode 100644 index 000000000..be41cd647 --- /dev/null +++ b/framework/Cache/migration/Horde_Cache/1_horde_cache_base_tables.php @@ -0,0 +1,20 @@ +tables())) { + $t = $this->createTable('horde_cache', array('primaryKey' => array('cache_id'))); + $t->column('cache_id', 'string', array('limit' => 32, 'null' => false)); + $t->column('cache_timestamp', 'bigint', array('null' => false)); + $t->column('cache_expiration', 'bigint', array('null' => false)); + $t->column('cache_data', 'binary'); + $t->end(); + } + } + + public function down() + { + $this->dropTable('horde_cache'); + } +} diff --git a/framework/Cache/package.xml b/framework/Cache/package.xml index 29036fe59..6840edb7e 100644 --- a/framework/Cache/package.xml +++ b/framework/Cache/package.xml @@ -19,8 +19,8 @@ Performance Suite's content cache), memcached, or an SQL table.slusarz@horde.org yes - 2010-11-16 - + 2011-01-26 + 0.2.0 0.2.0 @@ -65,6 +65,11 @@ Performance Suite's content cache), memcached, or an SQL table. + + + + + @@ -126,6 +131,7 @@ Performance Suite's content cache), memcached, or an SQL table. + @@ -170,7 +176,7 @@ Initial packaging. beta beta - 2010-11-16 + 2011-01-26 LGPL * Abstracted storage-specific code into 'Storage' drivers. diff --git a/horde/scripts/sql/horde_cache.pgsql.sql b/horde/scripts/sql/horde_cache.pgsql.sql deleted file mode 100644 index c461d9d50..000000000 --- a/horde/scripts/sql/horde_cache.pgsql.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE horde_cache ( - cache_id VARCHAR(32) NOT NULL, - cache_timestamp BIGINT NOT NULL, - cache_expiration BIGINT NOT NULL, - cache_data TEXT, - - PRIMARY KEY (cache_id) -); diff --git a/horde/scripts/sql/horde_cache.sql b/horde/scripts/sql/horde_cache.sql deleted file mode 100644 index 3c1c53a85..000000000 --- a/horde/scripts/sql/horde_cache.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE horde_cache ( - cache_id VARCHAR(32) NOT NULL, - cache_timestamp BIGINT NOT NULL, - cache_expiration BIGINT NOT NULL, - cache_data LONGBLOB, --- Or on PostgreSQL: --- cache_data TEXT, --- Or on some other DBMS systems: --- cache_data IMAGE, - - PRIMARY KEY (cache_id) -); -- 2.11.0