You are here

function views_calc_schema in Views Calc 7

Same name and namespace in other branches
  1. 6.3 views_calc.install \views_calc_schema()
  2. 6 views_calc.install \views_calc_schema()

Implements hook_schema().

File

./views_calc.install, line 11
Install, update and uninstall functions for the views_calc module.

Code

function views_calc_schema() {
  $schema['views_calc_fields'] = array(
    'fields' => array(
      'cid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'disp-width' => '10',
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'format' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'custom' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'base' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'tablelist' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
      'fieldlist' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
      'calc' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'cid',
    ),
    'indexes' => array(
      'cid' => array(
        'cid',
      ),
    ),
  );
  return $schema;
}