function tmgmt_update_7010 in Translation Management Tool 7
Create tmgmt_remote table to provide generic functionality for remote job mappings.
File
- ./
tmgmt.install, line 727 - Installation hooks for the Translation Management module.
Code
function tmgmt_update_7010() {
db_create_table('tmgmt_remote', array(
'description' => 'TMGMT job remote mapping.',
'fields' => array(
'trid' => array(
'description' => 'The primary key.',
'type' => 'serial',
'not null' => TRUE,
),
'tjid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => '{tmgmt_job}.tjid foreign key',
),
'tjiid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => '{tmgmt_job_item}.tjjid foreign key',
),
'data_item_key' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Translation job data item key.',
),
'remote_identifier_1' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Custom remote identifier data.',
),
'remote_identifier_2' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Custom remote identifier data.',
),
'remote_identifier_3' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Custom remote identifier data.',
),
'remote_url' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Remote job url.',
),
'word_count' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Word count info provided by the remote service.',
),
'remote_data' => array(
'description' => 'Custom remote data.',
'type' => 'text',
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'trid',
),
'indexes' => array(
'tjid' => array(
'tjid',
),
'tjiid' => array(
'tjiid',
),
'remote_identifiers' => array(
'remote_identifier_1',
'remote_identifier_2',
'remote_identifier_3',
),
),
));
}