/[drupal]/contributions/modules/taxonomy_image/taxonomy_image.install
ViewVC logotype

Diff of /contributions/modules/taxonomy_image/taxonomy_image.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.5.2.11, Tue Feb 17 18:57:12 2009 UTC revision 1.1.4.5.2.12, Fri May 1 16:12:16 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: taxonomy_image.install,v 1.1.4.5.2.10 2009/02/12 17:58:51 nancyw Exp $  // $Id: taxonomy_image.install,v 1.1.4.5.2.11 2009/02/17 18:57:12 nancyw Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 68  function taxonomy_image_schema() { Line 68  function taxonomy_image_schema() {
68    
69    $schema['cache_tax_image'] = array(    $schema['cache_tax_image'] = array(
70      'module' => 'Taxonomy Image',      'module' => 'Taxonomy Image',
71        'description' => t('Cache table for Taxonomy Image.'),
72      'fields' => array(      'fields' => array(
73        'cid' => array(        'cid' => array(
74          'description' => t('Primary Key: Unique cache ID.'),          'description' => t('Primary Key: Unique cache ID.'),
# Line 113  function taxonomy_image_schema() { Line 114  function taxonomy_image_schema() {
114   * Add a cache table.   * Add a cache table.
115   */   */
116  function taxonomy_image_update_6100() {  function taxonomy_image_update_6100() {
   $schema['cache_tax_image'] = array(  
     'module' => 'Taxonomy Image',  
     'fields' => array(  
       'cid' => array(  
         'description' => t('Primary Key: Unique cache ID.'),  
         'type' => 'varchar',  
         'length' => 255,  
         'not null' => TRUE,  
         'default' => ''),  
       'data' => array(  
         'description' => t('A collection of data to cache.'),  
         'type' => 'blob',  
         'not null' => FALSE,  
         'size' => 'big'),  
       'expire' => array(  
         'description' => t('A Unix timestamp indicating when the cache entry should expire, or 0 for never.'),  
         'type' => 'int',  
         'not null' => TRUE,  
         'default' => 0),  
       'created' => array(  
         'description' => t('A Unix timestamp indicating when the cache entry was created.'),  
         'type' => 'int',  
         'not null' => TRUE,  
         'default' => 0),  
       'headers' => array(  
         'description' => t('Any custom HTTP headers to be added to cached data.'),  
         'type' => 'text',  
         'not null' => FALSE),  
       'serialized' => array(  
         'description' => t('A flag to indicate whether content is serialized (1) or not (0).'),  
         'type' => 'int',  
         'size' => 'small',  
         'not null' => TRUE,  
         'default' => 0)  
       ),  
     'indexes' => array('expire' => array('expire')),  
     'primary key' => array('cid'),  
     );  
   
117    $ret = array();    $ret = array();
118    db_create_table($ret, 'cache_tax_image', $schema['cache_tax_image']);  
119      // Upgrading from 5.x?
120      if (db_table_exists('cache_tax_image')) {
121        if (!db_column_exists('cache_tax_image', 'serialized')) {
122          db_add_column($ret, 'cache_tax_image', 'serialized', 'smallint', array('not null' => TRUE, 'default' => 0));
123        }
124      }
125      else {
126        $schema['cache_tax_image'] = array(
127          'module' => 'Taxonomy Image',
128          'fields' => array(
129            'cid' => array(
130              'description' => t('Primary Key: Unique cache ID.'),
131              'type' => 'varchar',
132              'length' => 255,
133              'not null' => TRUE,
134              'default' => ''),
135            'data' => array(
136              'description' => t('A collection of data to cache.'),
137              'type' => 'blob',
138              'not null' => FALSE,
139              'size' => 'big'),
140              'expire' => array(
141              'description' => t('A Unix timestamp indicating when the cache entry should expire, or 0 for never.'),
142              'type' => 'int',
143              'not null' => TRUE,
144              'default' => 0),
145            'created' => array(
146              'description' => t('A Unix timestamp indicating when the cache entry was created.'),
147              'type' => 'int',
148              'not null' => TRUE,
149              'default' => 0),
150            'headers' => array(
151              'description' => t('Any custom HTTP headers to be added to cached data.'),
152              'type' => 'text',
153              'not null' => FALSE),
154            'serialized' => array(
155              'description' => t('A flag to indicate whether content is serialized (1) or not (0).'),
156              'type' => 'int',
157              'size' => 'small',
158              'not null' => TRUE,
159              'default' => 0)
160            ),
161          'indexes' => array('expire' => array('expire')),
162          'primary key' => array('cid'),
163          );
164    
165        db_create_table($ret, 'cache_tax_image', $schema['cache_tax_image']);
166      }
167    
168    return $ret;    return $ret;
169  }  }

Legend:
Removed from v.1.1.4.5.2.11  
changed lines
  Added in v.1.1.4.5.2.12

  ViewVC Help
Powered by ViewVC 1.1.2