function l10n_update_schema in Localization update 7.2
Same name and namespace in other branches
- 6 l10n_update.install \l10n_update_schema()
- 7 l10n_update.install \l10n_update_schema()
Implements hook_schema().
2 calls to l10n_update_schema()
- l10n_update_update_7204 in ./
l10n_update.install - Increase the length of the name column.
- l10n_update_update_7205 in ./
l10n_update.install - Increase the length of the name column.
File
- ./
l10n_update.install, line 11 - Install file for l10n remote updates.
Code
function l10n_update_schema() {
$schema['l10n_update_project'] = array(
'description' => 'Update information for project translations.',
'fields' => array(
'name' => array(
'description' => 'A unique short name to identify the project.',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'project_type' => array(
'description' => 'Project type, may be core, module, theme',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'core' => array(
'description' => 'Core compatibility string for this project.',
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => 'Human readable name for project used on the interface.',
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'l10n_path' => array(
'description' => 'Server path this project updates.',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'status' => array(
'description' => 'Status flag. If TRUE, translations of this module will be updated.',
'type' => 'int',
'not null' => TRUE,
'default' => 1,
),
),
'primary key' => array(
'name',
),
);
$schema['l10n_update_file'] = array(
'description' => 'File and download information for project translations.',
'fields' => array(
'project' => array(
'description' => 'A unique short name to identify the project.',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'language' => array(
'description' => 'Reference to the {languages}.language for this translation.',
'type' => 'varchar',
'length' => '12',
'not null' => TRUE,
),
'type' => array(
'description' => 'File origin: download or localfile',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
'default' => '',
),
'filename' => array(
'description' => 'Link to translation file for download.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'fileurl' => array(
'description' => 'Link to translation file for download.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'uri' => array(
'description' => 'File system path for importing the file.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'timestamp' => array(
'description' => 'Unix timestamp of the time the file was downloaded or saved to disk. Zero if not yet downloaded',
'type' => 'int',
'not null' => FALSE,
'disp-width' => '11',
'default' => 0,
),
'version' => array(
'description' => 'Version tag of the downloaded file.',
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'status' => array(
'description' => 'Status flag. TBD',
'type' => 'int',
'not null' => TRUE,
'default' => 1,
),
'last_checked' => array(
'description' => 'Unix timestamp of the last time this translation was downloaded from or checked at remote server and confirmed to be the most recent release available.',
'type' => 'int',
'not null' => FALSE,
'disp-width' => '11',
'default' => 0,
),
),
'primary key' => array(
'project',
'language',
),
);
return $schema;
}