globallink_interface.install in GlobalLink Connect for Drupal 7.6
Same filename and directory in other branches
GlobalLink interface translation install file.
File
globallink_interface/globallink_interface.installView source
<?php
/**
* @file
* GlobalLink interface translation install file.
*/
/**
* Implements hook_schema().
*/
function globallink_interface_schema() {
$schema = array();
$schema['globallink_core_interface'] = array(
'description' => 'GlobalLink Core Table for Built-in Interfaces',
'fields' => array(
'rid' => array(
'description' => 'The row ID',
'type' => 'serial',
'unsigned' => FALSE,
'not null' => TRUE,
),
'object_id' => array(
'description' => 'Object id',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'object_type' => array(
'description' => 'The type of this object like interface',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The title of this object.',
'type' => 'text',
'not null' => FALSE,
),
'timestamp' => array(
'description' => 'The timestamp',
'type' => 'int',
'length' => 14,
'unsigned' => TRUE,
'not null' => FALSE,
),
'source' => array(
'description' => 'The origin language of the requested translation',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
),
'target' => array(
'description' => 'The target language of the requested translation',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
),
'status' => array(
'description' => 'The status of the request',
'type' => 'varchar',
'not null' => TRUE,
'default' => 'Pending Translations',
'length' => 50,
),
'document_ticket' => array(
'description' => 'PD Document Ticket Id',
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 50,
),
'submission' => array(
'description' => 'PD Submission Name',
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
),
'submission_ticket' => array(
'description' => 'PD Submission Ticket Id',
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 50,
),
'project_code' => array(
'description' => 'PD Project Code',
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
),
'last_modified' => array(
'description' => 'Last Modified Date for Source',
'type' => 'int',
'length' => 14,
'unsigned' => TRUE,
'not null' => FALSE,
),
'changed' => array(
'description' => 'Boolean Flag indicating whether source node has changed',
'type' => 'int',
'length' => 1,
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'rid',
),
'indexes' => array(
'status' => array(
'status',
),
),
);
return $schema;
}
/**
* Version 2.6.0 updates
*/
function globallink_interface_update_7260() {
db_add_field('globallink_core_interface', 'project_code', array(
'description' => 'PD Project Code.',
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
));
}
function globallink_interface_update_7640() {
db_query("ALTER TABLE globallink_core_interface MODIFY title TEXT");
}
Functions
Name | Description |
---|---|
globallink_interface_schema | Implements hook_schema(). |
globallink_interface_update_7260 | Version 2.6.0 updates |
globallink_interface_update_7640 |