You are here

function lingotek_schema in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 8 lingotek.install \lingotek_schema()
  2. 8.2 lingotek.install \lingotek_schema()
  3. 6 lingotek.install \lingotek_schema()
  4. 7.7 lingotek.install \lingotek_schema()
  5. 7.2 lingotek.install \lingotek_schema()
  6. 7.3 lingotek.install \lingotek_schema()
  7. 7.4 lingotek.install \lingotek_schema()
  8. 7.5 lingotek.install \lingotek_schema()
  9. 4.0.x lingotek.install \lingotek_schema()
  10. 3.0.x lingotek.install \lingotek_schema()
  11. 3.1.x lingotek.install \lingotek_schema()
  12. 3.2.x lingotek.install \lingotek_schema()
  13. 3.3.x lingotek.install \lingotek_schema()
  14. 3.4.x lingotek.install \lingotek_schema()
  15. 3.5.x lingotek.install \lingotek_schema()
  16. 3.6.x lingotek.install \lingotek_schema()
  17. 3.7.x lingotek.install \lingotek_schema()
  18. 3.8.x lingotek.install \lingotek_schema()

File

./lingotek.install, line 91

Code

function lingotek_schema() {
  $schema['lingotek_entity_metadata'] = array(
    'description' => 'Stores Lingotek-related metadata about Drupal entities.',
    'fields' => array(
      'entity_id' => array(
        'description' => 'The primary identifier for the entity.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'entity_type' => array(
        'description' => 'The entity type (node, comment, etc.).',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'entity_key' => array(
        'description' => 'The ID for the Lingotek-associated value.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'value' => array(
        'description' => 'Value for the specified key.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'created' => array(
        'type' => 'int',
        'description' => "created timestamp",
        'default' => 0,
        'not null' => TRUE,
      ),
      'modified' => array(
        'type' => 'int',
        'description' => "last modified timestamp",
        'default' => 0,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'entity_id',
      'entity_type',
      'entity_key',
    ),
    'indexes' => array(
      'idx_entity_id' => array(
        'entity_id',
      ),
      'idx_entity_key' => array(
        'entity_key',
      ),
      'idx_entity_type_and_key' => array(
        'entity_type',
        'entity_key',
      ),
      'idx_entity_key_and_value' => array(
        'entity_key',
        'value',
      ),
    ),
  );
  $schema['lingotek_config_metadata'] = array(
    'description' => 'Stores Lingotek-related metadata about Drupal translations from locales source and target tables.',
    'fields' => array(
      'id' => array(
        'description' => 'the segment ID assigned to the given range of strings.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'config_key' => array(
        'description' => 'The ID for the Lingotek-associated value.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'value' => array(
        'description' => 'Value for the specified key.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'created' => array(
        'type' => 'int',
        'description' => "created timestamp",
        'default' => 0,
        'not null' => TRUE,
      ),
      'modified' => array(
        'type' => 'int',
        'description' => "last modified timestamp",
        'default' => 0,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
      'config_key',
    ),
  );
  $schema['lingotek_translation_agent'] = array(
    'description' => 'An assignment of IDs to agents from which translations were added.',
    'fields' => array(
      'id' => array(
        'description' => 'the ID assigned to a given translation agent.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'name' => array(
        'description' => 'The name of a given tool for adding translations.',
        'type' => 'varchar',
        'length' => 63,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  $schema['lingotek_config_map'] = array(
    'description' => 'An assignment of lids from locales_source and locales_target to set_ids for translation by Lingotek.',
    'fields' => array(
      'lid' => array(
        'description' => 'The ID assigned by the i18n_string module.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'set_id' => array(
        'description' => 'The ID of the set assigned to the string by the Lingotek Translation module.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'current' => array(
        'description' => 'Tells whether the translation for the individual config item is dirty and needs to be updated or not.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'lid',
    ),
  );
  return $schema;
}