You are here

function data_node_schema in Data 6

Implementation of hook_schema().

File

data_node/data_node.install, line 10
Install hooks for Data Node module.

Code

function data_node_schema() {
  $schema = array();
  $schema['data_table_node'] = array(
    'description' => 'Relate data records to nodes',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'data_table_name' => array(
        'type' => 'varchar',
        'size' => 'normal',
        'length' => 64,
        'not null' => TRUE,
      ),
      'id' => array(
        'type' => 'int',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'data_table_name' => array(
        'data_table_name',
      ),
      'id' => array(
        'id',
      ),
      'name_id' => array(
        'data_table_name',
        'id',
      ),
    ),
    'primary key' => array(
      'nid',
      'data_table_name',
      'id',
    ),
  );
  return $schema;
}