function l10n_update_update_6002 in Localization update 7
Same name and namespace in other branches
- 6 l10n_update.install \l10n_update_update_6002()
Change status field name to l10n_status.
File
- ./
l10n_update.install, line 250 - Install file for l10n remote updates.
Code
function l10n_update_update_6002() {
// I18n Strings module adds a 'status' column to 'locales_target' table.
// L10n Update module previously added a column with the same name. To avoid
// any collision we change the column name here, but only if it was added by
// L10n Update module.
if (!db_field_exists('locales_target', 'l10n_status') && db_field_exists('locales_target', 'status') && !db_table_exists('i18n_strings')) {
db_change_field('locales_target', 'status', 'l10n_status', array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
}
elseif (!db_field_exists('locales_target', 'l10n_status')) {
db_add_field('locales_target', 'l10n_status', array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
}
return t('Resolved possible l10n_status field conflict in locales_target.');
}