function mobile_codes_schema in Mobile Codes 6.2
Same name and namespace in other branches
- 6 mobile_codes.install \mobile_codes_schema()
- 7.2 mobile_codes.install \mobile_codes_schema()
Implements hook_schema().
File
- ./
mobile_codes.install, line 9
Code
function mobile_codes_schema() {
$schema['mobile_codes_presets'] = array(
'export' => array(
'key' => 'name',
'key name' => 'Name',
'primary key' => 'name',
'identifier' => 'preset',
'default hook' => 'default_mobile_codes_preset',
'api' => array(
'owner' => 'mobile_codes',
'api' => 'default_mobile_codes_presets',
'minimum_version' => 2,
'current_version' => 2,
),
),
'fields' => array(
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => '',
),
'provider' => array(
'type' => 'varchar',
'length' => 255,
'description' => '',
),
'defaults' => array(
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
'serialize' => TRUE,
'description' => '',
),
),
'unique keys' => array(
'name' => array(
'name',
),
),
'primary key' => array(
'name',
),
);
$schema['mobile_codes_providers'] = array(
'export' => array(
'key' => 'name',
'key name' => 'Name',
'primary key' => 'name',
'identifier' => 'provider',
'default hook' => 'default_mobile_codes_provider',
'api' => array(
'owner' => 'mobile_codes',
'api' => 'default_mobile_codes_providers',
'minimum_version' => 2,
'current_version' => 2,
),
),
'fields' => array(
'name' => array(
'type' => 'varchar',
'length' => 255,
'description' => '',
),
'url' => array(
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
'description' => '',
),
'parameters' => array(
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
'serialize' => TRUE,
'description' => '',
),
),
'primary key' => array(
'name',
),
'unique keys' => array(
'name' => array(
'name',
),
),
);
return $schema;
}