function addressfield_field_schema in Address Field 7
Implements hook_field_schema()
File
- ./
addressfield.install, line 6
Code
function addressfield_field_schema() {
$columns = array(
'country' => array(
'description' => 'Two letter ISO country code of this address.',
'type' => 'varchar',
'length' => 2,
'not null' => FALSE,
'default' => '',
),
'administrative_area' => array(
'description' => 'The administrative area of this address. (i.e. State/Province)',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'sub_administrative_area' => array(
'description' => 'The sub administrative area of this address.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'locality' => array(
'description' => 'The locality of this address. (i.e. City)',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'dependent_locality' => array(
'description' => 'The dependent locality of this address.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'postal_code' => array(
'description' => 'The postal code of this address.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'thoroughfare' => array(
'description' => 'The thoroughfare of this address. (i.e. Street address)',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'premise' => array(
'description' => 'The premise of this address. (i.e. Apartment / Suite number)',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'sub_premise' => array(
'description' => 'The sub_premise of this address.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
),
'organisation_name' => array(
'description' => 'Contents of a primary OrganisationName element in the xNL XML.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
),
'name_line' => array(
'description' => 'Contents of a primary NameLine element in the xNL XML.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
),
'first_name' => array(
'description' => 'Contents of the FirstName element of a primary PersonName element in the xNL XML.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
),
'last_name' => array(
'description' => 'Contents of the LastName element of a primary PersonName element in the xNL XML.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
),
'data' => array(
'description' => 'Additional data for this address.',
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
'serialize' => TRUE,
),
);
return array(
'columns' => $columns,
);
}