You are here

function nodewords_update_6153 in Nodewords: D6 Meta Tags 6

Implements hook_update_N().

File

./nodewords.install, line 1032
Installation file for nodewords.module.

Code

function nodewords_update_6153() {
  $ret = array();
  $schema['nodewords_custom'] = array(
    'fields' => array(
      'pid' => array(
        'description' => 'The primary key.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'path' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'weight' => array(
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 0,
      ),
      'enabled' => array(
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  if (db_table_exists('nodewords_custom')) {
    db_drop_unique_key($ret, 'nodewords_custom', 'path');
  }
  else {
    db_create_table($ret, 'nodewords_custom', $schema['nodewords_custom']);
  }
  return $ret;
}