You are here

function lingotek_migration_2 in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_migration_2()
  2. 7.2 lingotek.util.inc \lingotek_migration_2()
  3. 7.3 lingotek.util.inc \lingotek_migration_2()
  4. 7.4 lingotek.util.inc \lingotek_migration_2()
  5. 7.5 lingotek.util.inc \lingotek_migration_2()

Migration 2

2 calls to lingotek_migration_2()
lingotek_install in ./lingotek.install
Implements hook_install().
lingotek_update_7210 in ./lingotek.install
Extend languages table to have lingotek_locale field

File

./lingotek.util.inc, line 1162
Utility functions.

Code

function lingotek_migration_2() {
  $spec = array(
    'type' => 'varchar',
    'description' => "Locale mapping",
    'length' => 10,
    'not null' => TRUE,
    'default' => '',
  );
  try {
    db_add_field('languages', 'lingotek_locale', $spec);
  } catch (DatabaseSchemaObjectExistsException $e) {

    // already exists (no need to do anything)
  }
  drupal_static_reset('language_list');
}