You are here

function sheetnode_schema_6001 in Sheetnode 6

Schema function.

1 call to sheetnode_schema_6001()
sheetnode_update_6001 in ./sheetnode.install
Implementation of hook_update_N().

File

./sheetnode.install, line 60

Code

function sheetnode_schema_6001() {
  $schema['sheetnode'] = array(
    'fields' => array(
      'nid' => array(
        'description' => t('The primary identifier for a node.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'value' => array(
        'description' => t('The serialized worksheet content.'),
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  $schema['sheetnode_template'] = array(
    'fields' => array(
      'tid' => array(
        'description' => t('The primary identifier for the template.'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '32',
        'default' => '',
        'not null' => TRUE,
        'description' => 'The unique name of the template. May only be alphanumeric characters plus underscores.',
      ),
      'value' => array(
        'description' => t('The serialized worksheet template content.'),
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
    ),
    'primary key' => array(
      'tid',
    ),
    'unique keys' => array(
      'key_name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}