You are here

function linkchecker_update_6201 in Link checker 6.2

Install linkchecker_comments table.

File

./linkchecker.install, line 367
Installation file for Link Checker module.

Code

function linkchecker_update_6201() {
  $ret = array();

  // Create new tables.
  $schema['linkchecker_comments'] = array(
    'description' => 'Stores all link references for comments.',
    'fields' => array(
      'cid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique {comments}.cid.',
      ),
      'lid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique {linkchecker_links}.lid.',
      ),
    ),
    'primary key' => array(
      'cid',
      'lid',
    ),
  );

  // Table may be created in 5201 by 5.x-2.x.
  if (!db_table_exists('linkchecker_comments')) {
    db_create_table($ret, 'linkchecker_comments', $schema['linkchecker_comments']);
  }
  return $ret;
}