function translation_entity_schema

Implements hook_schema().

File

drupal/core/modules/translation_entity/translation_entity.install, line 13
Installation functions for Entity Translation module.

Code

function translation_entity_schema() {
  $schema['translation_entity'] = array(
    'description' => 'Table to track entity translations',
    'fields' => array(
      'entity_type' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The entity type this translation relates to',
      ),
      'entity_id' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The entity id this translation relates to',
      ),
      'langcode' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The target language for this translation.',
      ),
      'source' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The source language from which this translation was created.',
      ),
      'outdated' => array(
        'description' => 'A boolean indicating whether this translation needs to be updated.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'uid' => array(
        'description' => 'The author of this translation.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'status' => array(
        'description' => 'Boolean indicating whether the translation is visible to non-translators.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'created' => array(
        'description' => 'The Unix timestamp when the translation was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'changed' => array(
        'description' => 'The Unix timestamp when the translation was most recently saved.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'entity_type',
      'entity_id',
      'langcode',
    ),
  );
  return $schema;
}