View source
<?php
function sms_international_install() {
db_query("INSERT INTO {sms_international} (iso, name, country_code, min_length, max_length, status) VALUES ('es', 'Spain', '34', '9', '9', 1)");
db_query("INSERT INTO {sms_international} (iso, name, country_code, min_length, max_length, status) VALUES ('gb', 'United Kingdom', '44', '9', '10', 1)");
db_query("INSERT INTO {sms_international} (iso, name, country_code, min_length, max_length, status) VALUES ('us', 'United States', '1', '10', '10', 1)");
}
function sms_international_schema() {
$schema['sms_international'] = array(
'fields' => array(
'iso' => array(
'type' => 'varchar',
'length' => 2,
'not null' => TRUE,
),
'name' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'country_code' => array(
'type' => 'varchar',
'length' => 4,
'not null' => TRUE,
),
'min_length' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'max_length' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'iso',
),
'indexes' => array(
'country_code' => array(
'country_code',
),
),
);
return $schema;
}