function i18n_path_schema in Internationalization 7
Implements hook_schema().
File
- i18n_path/
i18n_path.install, line 23 - Install, update and uninstall functions for the text module.
Code
function i18n_path_schema() {
$schema['i18n_path'] = array(
'description' => 'Path translation',
'fields' => array(
'tpid' => array(
'description' => 'The primary identifier for a path in the translation set.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'tsid' => array(
'description' => 'The primary identifier for a translation set.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'path' => array(
'description' => 'The Drupal path this alias is for; e.g. node/12.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'language' => array(
'description' => "The language for which this path is a translation.",
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
),
'pid' => array(
'description' => 'A unique path alias identifier if the path has an alias.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'path' => array(
'path',
),
),
'unique keys' => array(
'set_language' => array(
'tsid',
'language',
),
),
'foreign keys' => array(
'path_language' => array(
'table' => 'languages',
'columns' => array(
'language' => 'language',
),
),
'translation_set' => array(
'table' => 'i18n_translation',
'columns' => array(
'tsid' => 'tsid',
),
),
),
'primary key' => array(
'tpid',
),
);
return $schema;
}