function countries_api_schema in Country codes API 6
Implementation of hook_schema().
File
- ./
countries_api.install, line 6 - Install file for Countries API.
Code
function countries_api_schema() {
$schema['countries_api_countries'] = array(
'description' => 'Data table for Country codes API.',
'fields' => array(
'iso2' => array(
'description' => 'ISO 3166-1 alpha 2 country code',
'type' => 'char',
'length' => 2,
'not null' => TRUE,
),
'iso3' => array(
'description' => 'ISO 3166-1 alpha 3 country code',
'type' => 'char',
'length' => 3,
'not null' => FALSE,
),
'name' => array(
'description' => 'ISO 3166-1 country name',
'type' => 'varchar',
'length' => 80,
'not null' => TRUE,
),
'printable_name' => array(
'description' => 'ISO 3166-1 country name with correct case',
'type' => 'varchar',
'length' => 80,
'not null' => TRUE,
),
'numcode' => array(
'description' => 'Country numcode',
'type' => 'int',
'size' => 'small',
'not null' => FALSE,
),
),
'primary key' => array(
'iso2',
),
);
return $schema;
}