update_109
- Versions
- 4.6
update_109()
Code
database/updates.inc, line 1887
<?php
function update_109() {
$ret = array();
// This is to fix the PostreSQL locales_source table.
if ($GLOBALS['db_type'] == 'pgsql') {
$ret[] = update_sql("ALTER TABLE {locales_source} RENAME location TO old_location");
$ret[] = update_sql("ALTER TABLE {locales_source} ADD COLUMN location text");
db_query("UPDATE {locales_source} SET location = old_location");
$ret[] = update_sql("ALTER TABLE {locales_source} ALTER COLUMN location SET NOT NULL");
$ret[] = update_sql("ALTER TABLE {locales_source} ALTER COLUMN location SET DEFAULT ''");
$ret[] = update_sql("ALTER TABLE {locales_target} DROP CONSTRAINT {locales_target}_locale_key ");
$ret[] = update_sql("ALTER TABLE {locales_target} DROP CONSTRAINT {locales_target}_plid_key ");
$ret[] = update_sql("ALTER TABLE {locales_target} DROP CONSTRAINT {locales_target}_plural_key ");
}
return $ret;
}
?>Login or register to post comments 