You are here

function sheetnode_schema_7003 in Sheetnode 7.2

Same name and namespace in other branches
  1. 7 sheetnode.install \sheetnode_schema_7003()

Schema function.

2 calls to sheetnode_schema_7003()
sheetnode_schema in ./sheetnode.install
Implements hook_schema().
sheetnode_update_7003 in ./sheetnode.install
Implements hook_update_N().

File

./sheetnode.install, line 104
Install, update and uninstall functions for the sheetnode module.

Code

function sheetnode_schema_7003() {
  $schema = sheetnode_schema_7001();
  $schema['sheetnode_view'] = array(
    'description' => 'The table for sheetview annotations.',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'The primary identifier for the annotation.',
      ),
      'view_name' => array(
        'type' => 'varchar',
        'length' => '32',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The unique name of the sheetview.',
      ),
      'display_id' => array(
        'type' => 'varchar',
        'length' => '32',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The display id of the sheetview.',
      ),
      'value' => array(
        'description' => 'The sheetview annotation content.',
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique_keys' => array(
      'view_name_display' => array(
        'view_name',
        'display_id',
      ),
    ),
  );
  return $schema;
}