You are here

choices.install in Poll Improved 7

Install, update and uninstall functions for the choices module.

File

modules/choices/choices.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the choices module.
 */

/**
 * Implements hook_field_schema().
 */
function choices_field_schema($field) {
  switch ($field['type']) {
    default:
      $columns = array(
        'value' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      );
      break;
  }
  $columns += array(
    'format' => array(
      'type' => 'varchar',
      'length' => 255,
      'not null' => FALSE,
    ),
  );
  return array(
    'columns' => $columns,
    'indexes' => array(
      'format' => array(
        'format',
      ),
    ),
    'foreign keys' => array(
      'format' => array(
        'table' => 'filter_format',
        'columns' => array(
          'format' => 'format',
        ),
      ),
    ),
  );
}

/**
 * Required to register migration.
 */
function choices_update_7001() {

  // Required to register migration.
}

Functions

Namesort descending Description
choices_field_schema Implements hook_field_schema().
choices_update_7001 Required to register migration.