You are here

function block_country_schema in Block Country 7

Implements hook_schema().

File

./block_country.install, line 11
Schema definitions install/update/uninstall hooks.

Code

function block_country_schema() {
  $schema = array();
  $schema['block_country'] = array(
    'description' => 'Block Country Table',
    'fields' => array(
      'country_block_id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary Key: Unique country_block_id.',
      ),
      'module' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'description' => "The block's origin module, from {block}.module.",
      ),
      'delta' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => "The block's unique delta within module, from {block}.delta.",
      ),
      'country_code' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => 'Country Code.',
      ),
    ),
    'primary key' => array(
      'country_block_id',
    ),
    'indexes' => array(
      'list' => array(
        'module',
        'delta',
      ),
    ),
  );
  return $schema;
}