~ubuntu-branches/ubuntu/wily/php-horde-cache/wily

« back to all changes in this revision

Viewing changes to Horde_Cache-2.2.1/migration/Horde/Cache/1_horde_cache_base_tables.php

  • Committer: Package Import Robot
  • Author(s): Mathieu Parent
  • Date: 2013-08-10 19:53:57 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130810195357-empm8uhqxxb7vk5n
Tags: 2.2.1-1
New upstream version 2.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * @category Horde
 
4
 * @internal
 
5
 * @package  Cache
 
6
 */
 
7
class HordeCacheBaseTables extends Horde_Db_Migration_Base
 
8
{
 
9
    public function up()
 
10
    {
 
11
        if (!in_array('horde_cache', $this->tables())) {
 
12
            $t = $this->createTable('horde_cache', array('autoincrementKey' => array('cache_id')));
 
13
            $t->column('cache_id', 'string', array('limit' => 32, 'null' => false));
 
14
            $t->column('cache_timestamp', 'bigint', array('null' => false));
 
15
            $t->column('cache_expiration', 'bigint', array('null' => false));
 
16
            $t->column('cache_data', 'binary');
 
17
            $t->end();
 
18
        }
 
19
    }
 
20
 
 
21
    public function down()
 
22
    {
 
23
        $this->dropTable('horde_cache');
 
24
    }
 
25
}