function locale_update_8011

Add a cache table and locale_project table for the locale module.

Related topics

File

drupal/core/modules/locale/locale.install, line 800
Install, update, and uninstall functions for the Locale module.

Code

function locale_update_8011() {

  // Add locale_project table.
  db_create_table('locale_project', array(
    'description' => 'Translation status information for projects and server data.',
    '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' => 15,
        'not null' => TRUE,
      ),
      'core' => array(
        'description' => 'Core compatibility string for this project.',
        'type' => 'varchar',
        'length' => 4,
        'not null' => TRUE,
        'default' => '',
      ),
      'version' => array(
        'description' => 'The release version of the project.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'server_pattern' => array(
        'description' => 'Pattern of path and name of the gettext file at the translation server.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'status' => array(
        'description' => 'The update status of the project.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'name',
    ),
  ));
}