function matrix_schema in Matrix field 6.2
Same name and namespace in other branches
- 6 matrix.install \matrix_schema()
Implementation of hook_schema().
File
- ./
matrix.install, line 46 - Installer for the matrix module
Code
function matrix_schema() {
$schema['node_field_matrix_data'] = array(
'description' => t('The base table for matrix data.'),
'fields' => array(
'nid' => array(
'description' => t('The primary identifier for a node.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => t('The current {node_revisions}.vid version identifier.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'field_name' => array(
'description' => t('The name of the CCK field.'),
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'row' => array(
'description' => t('Row ID'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'col' => array(
'description' => t('Column ID'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'value' => array(
'description' => t('Value of cell'),
'type' => 'text',
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'nid' => array(
'nid',
),
'vid' => array(
'vid',
),
),
);
return $schema;
}