Index: updates.inc =================================================================== RCS file: /cvs/drupal/drupal/database/updates.inc,v retrieving revision 1.111 diff -u -F^f -r1.111 updates.inc --- updates.inc 30 Apr 2005 18:16:38 -0000 1.111 +++ updates.inc 3 May 2005 06:22:11 -0000 @@ -111,6 +111,7 @@ "2005-04-14" => "update_132", "2005-04-24" => "update_133", "2005-04-30" => "update_134" + "2005-05-02" => "update_135" ); function update_32() { @@ -2437,6 +2438,23 @@ function update_134() { return $ret; } +function update_135() { + $ret = array(); + + if ($GLOBALS['db_type'] == 'mysql') { + $ret[] = update_sql("ALTER TABLE {locales_source} CHANGE location location varchar(255) NOT NULL default ''"); + } + elseif ($GLOBALS['db_type'] == 'pgsql') { + $ret[] = update_sql("ALTER TABLE {locales_source} RENAME location TO location_old"); + $ret[] = update_sql("ALTER TABLE {locales_source} ADD location varchar(255)"); + $ret[] = update_sql("ALTER TABLE {locales_source} ALTER location SET NOT NULL"); + $ret[] = update_sql("ALTER TABLE {locales_source} ALTER location SET DEFAULT ''"); + $ret[] = update_sql("UPDATE {locales_source} SET location = location_old"); + $ret[] = update_sql("ALTER TABLE {locales_source} DROP location_old"); + } + return $ret; +} + function update_sql($sql) { $edit = $_POST["edit"]; $result = db_query($sql);