You are here

function signature_forum_update_6100 in Signatures for Forums 6

Implementation of hook_update_n().

File

./signature_forum.install, line 114
Installs, updates and uninstalls signature_forum module.

Code

function signature_forum_update_6100() {
  $schema['signature_post'] = array(
    'fields' => array(
      'delta' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'description' => 'The id of the attached object. nid for nodes and cid for comments.',
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'type' => array(
        'description' => 'The type of comment to attach settings.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'status' => array(
        'type' => 'int',
        'description' => 'A boolean indicator for whether or not a signature should be displayed: 1 means display, 0 means not displayed.',
        'size' => 'tiny',
        'not null' => TRUE,
        'disp-width' => '11',
      ),
    ),
    'primary key' => array(
      'delta',
      'type',
    ),
  );
  $ret = array();
  db_add_field($ret, 'users_signature', 'status', array(
    'type' => 'int',
    'description' => 'A boolean indicator for whether or not a signature should be displayed by default: 1 means display, 0 means not displayed.',
    'size' => 'tiny',
    'not null' => FALSE,
    'initial' => 1,
  ));
  db_create_table($ret, 'signature_post', $schema['signature_post']);
  signature_forum_build_signature_status();
  return $ret;
}