You are here

field_weight.install in Field display weights (per node) 7

Same filename and directory in other branches
  1. 7.2 field_weight.install

Field weight module install file.

File

field_weight.install
View source
<?php

/**
 * @file
 * 
 * Field weight module install file.
 */

/**
 * Implements hook_schema().
 */
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;
}

/**
 * Implements hook_uninstall().
 */
function field_weight_uninstall() {
  variable_del('field_weight_node_types');
}

Functions