--- /dev/null
+<?php
+class HordeCacheBaseTables extends Horde_Db_Migration_Base
+{
+ public function up()
+ {
+ if (!in_array('horde_cache', $this->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');
+ }
+}
<email>slusarz@horde.org</email>
<active>yes</active>
</lead>
- <date>2010-11-16</date>
- <time>15:41:39</time>
+ <date>2011-01-26</date>
+ <time>21:38:11</time>
<version>
<release>0.2.0</release>
<api>0.2.0</api>
<file name="Cache.php" role="php" />
</dir> <!-- /lib/Horde -->
</dir> <!-- /lib -->
+ <dir name="migration">
+ <dir name="Horde_Cache">
+ <file name="1_horde_cache_base_tables.php" role="data" />
+ </dir> <!-- /migration/Horde_Cache -->
+ </dir> <!-- /migration -->
</dir> <!-- / -->
</contents>
<dependencies>
<install as="Horde/Cache/Storage/Sql.php" name="lib/Horde/Cache/Storage/Sql.php" />
<install as="Horde/Cache/Storage/Stack.php" name="lib/Horde/Cache/Storage/Stack.php" />
<install as="Horde/Cache/Storage/Xcache.php" name="lib/Horde/Cache/Storage/Xcache.php" />
+ <install as="migration/1_horde_cache_base_tables.php" name="migration/Horde_Cache/1_horde_cache_base_tables.php" />
</filelist>
</phprelease>
<changelog>
<release>beta</release>
<api>beta</api>
</stability>
- <date>2010-11-16</date>
+ <date>2011-01-26</date>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
<notes>
* Abstracted storage-specific code into 'Storage' drivers.
+++ /dev/null
-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)
-);
+++ /dev/null
-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)
-);