You are here

function ccl_schema in Custom Contextual Links 7

Same name and namespace in other branches
  1. 8 ccl.install \ccl_schema()

Implements hook_schema().

File

./ccl.install, line 10
Provides install, upgrade and un-install functions for ccl.

Code

function ccl_schema() {
  $schema['ccl'] = array(
    'description' => 'The base table for custom context links.',
    'fields' => array(
      'clid' => array(
        'description' => 'The primary identifier for a link.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'no export' => TRUE,
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'The type the link will target.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'title' => array(
        'description' => 'The title of link.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'link' => array(
        'description' => 'The URL of link.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'options' => array(
        'description' => 'The options for this specific link.',
        'type' => 'blob',
        'not null' => TRUE,
        'size' => 'big',
      ),
    ),
    'primary key' => array(
      'clid',
    ),
  );
  return $schema;
}