You are here

function field_weight_schema in Field display weights (per node) 7

Same name and namespace in other branches
  1. 7.2 field_weight.install \field_weight_schema()

Implements hook_schema().

File

./field_weight.install, line 12
Field weight module install file.

Code

function field_weight_schema() {
  $schema['field_weight'] = array(
    'description' => 'Field weight table.',
    'fields' => array(
      'nid' => array(
        'description' => 'The primary identifier for a node.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'The bundle type of this node.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'field_weights' => array(
        'description' => 'Serialised array of keyed array containing field_name => weight.',
        'type' => 'blob',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}