You are here

function matrix_schema in Matrix field 6

Same name and namespace in other branches
  1. 6.2 matrix.install \matrix_schema()

Implementation of hook_schema().

File

./matrix.install, line 40

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 chart type for this node.'),
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'row' => array(
        'description' => t('Number of rows?'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'col' => array(
        'description' => t('Number of columns?'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'value' => array(
        'description' => t('Serialized data to be stored for this field'),
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
  );
  return $schema;
}