You are here

countries_configuration.install in Countries 8

Same filename and directory in other branches
  1. 7.2 modules/countries_configuration/countries_configuration.install

Install file for Countries Configuration module.

File

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

/**
 * @file
 * Install file for Countries Configuration module.
 */

/**
 * Implements hook_schema().
 */
function countries_configuration_schema() {
  $schema['countries_data'] = array(
    'description' => 'Maintains additional country information on behalf of other modules.',
    'fields' => array(
      'iso2' => array(
        'description' => 'ISO2 country code.',
        'type' => 'char',
        'length' => 2,
        'not null' => TRUE,
      ),
      'module' => array(
        'description' => 'The name of the module that generated this record.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'system',
      ),
      'name' => array(
        'description' => 'The key of the record that we are storing.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'system',
      ),
      'data' => array(
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'A serialized array of configuration data.',
      ),
    ),
    'primary key' => array(
      'iso2',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
countries_configuration_schema Implements hook_schema().