You are here

function domain_locale_schema in Domain Locale 6

Same name and namespace in other branches
  1. 7 domain_locale.install \domain_locale_schema()

Implementation of hook_schema().

File

./domain_locale.install, line 43
Provides domain specific locale settings

Code

function domain_locale_schema() {
  $schema['domain_locale'] = array(
    'description' => t('Domain Access specific language settings'),
    'fields' => array(
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
      ),
      'domain_id' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'description' => t("Domain id"),
        'not null' => TRUE,
        'default' => 0,
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => t("Language weight"),
      ),
    ),
    'primary key' => array(
      'domain_id',
      'language',
    ),
    'indexes' => array(
      'domain_id' => array(
        'domain_id',
      ),
      'domain_language' => array(
        'domain_id',
        'language',
      ),
      'domain_language_weight' => array(
        'domain_id',
        'language',
        'weight',
      ),
    ),
  );
  return $schema;
}