You are here

function translation_overview_update_6001 in Translation Overview 6.2

Change the field names on the {translation_overview_priority} table.

File

./translation_overview.install, line 107

Code

function translation_overview_update_6001() {
  $ret = array();

  // Make sure the module is loaded so we have access to translation_overview_field_name().
  module_load_include('module', 'translation_overview');
  $spec = array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => TRANSLATION_OVERVIEW_NORMAL,
  );
  foreach (language_list('language', TRUE) as $lang_code => $language) {
    db_change_field($ret, 'translation_overview_priority', db_escape_table($lang_code), translation_overview_field_name($lang_code), $spec);
  }
  return $ret;
}