Project

General

Profile

Download (1.07 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/**
3
 * @file
4
 * Install, update and uninstall functions for the cdm_taxontree module.
5
 */
6

    
7
/**
8
 * Implements hook_schema().
9
 * The drupal_(un)install_schema functions are called automatically in D7.
10
 */
11
function cdm_taxontree_schema() {
12
  // return an empty array since we removed the cache_cdm_taxontree schema and still want to keep this hook implementation
13
  return array();
14
}
15

    
16
/**
17
 * Update D5 cache table to match Drupal 7 cache table columns.
18
 */
19
function cdm_taxontree_update_7000() {
20
  $schema = cdm_taxontree_schema();
21

    
22
  // No need to use db_change_field() here.
23
  // We simply drop and recreate the cache tables to start clean.
24
  db_drop_table('cache_cdm_taxontree');
25
  // we now removed the schema for the cache_cdm_taxontree since it was unused, so there is no need to create it
26
  // db_create_table('cache_cdm_taxontree', $schema['cache_cdm_taxontree']); this
27
}
28

    
29
/**
30
 * update for RELEASE 3.2.1:
31
 *  - drop cache_cdm_taxontree
32
 */
33
function cdm_taxontree_update_7301() {
34
  if(db_drop_table('cache_cdm_taxontree')){
35
    return t('table cache_cdm_taxontree dropped');
36

    
37
  }
38
}
(4-4/16)