function sheetnode_schema_7001 in Sheetnode 7.2
Same name and namespace in other branches
- 7 sheetnode.install \sheetnode_schema_7001()
Schema function.
1 call to sheetnode_schema_7001()
- sheetnode_schema_7003 in ./
sheetnode.install - Schema function.
File
- ./
sheetnode.install, line 18 - Install, update and uninstall functions for the sheetnode module.
Code
function sheetnode_schema_7001() {
$schema['sheetnode'] = array(
'description' => 'The base table for sheetnodes.',
'fields' => array(
'nid' => array(
'description' => 'The primary identifier for a node.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The revision identifier for a node.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'value' => array(
'description' => 'The worksheet content.',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array(
'vid',
),
'unique keys' => array(
'nid_vid' => array(
'nid',
'vid',
),
),
'foreign keys' => array(
'node_revision' => array(
'table' => 'node_revision',
'columns' => array(
'vid' => 'vid',
),
),
'node' => array(
'table' => 'node',
'columns' => array(
'nid' => 'nid',
),
),
),
);
$schema['sheetnode_template'] = array(
'description' => 'The table for sheetnode templates.',
'fields' => array(
'tid' => array(
'description' => '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.',
),
'value' => array(
'description' => 'The worksheet template content.',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'vid' => array(
'description' => 'The original node version for this template.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
),
),
'primary key' => array(
'tid',
),
'unique keys' => array(
'name' => array(
'name',
),
'vid' => array(
'vid',
),
),
'foreign keys' => array(
'node_revision' => array(
'table' => 'node_revision',
'columns' => array(
'vid' => 'vid',
),
),
),
);
return $schema;
}