diff --git a/upgrade.php b/upgrade.php index bb71bd23..30bc6505 100644 --- a/upgrade.php +++ b/upgrade.php @@ -1376,10 +1376,14 @@ function upgrade_1762() { _db_add_field('fetchmail', 'modified', '{DATECURRENT}', 'created'); } -function upgrade_1763() { +function upgrade_1763_mysql() { $table = table_by_key('fetchmail'); db_query_parsed("UPDATE $table SET domain=SUBSTRING_INDEX(mailbox, '@', -1) WHERE domain='';"); } +function upgrade_1763_pgsql() { + $table = table_by_key('fetchmail'); + db_query_parsed("UPDATE $table SET domain=SPLIT_PART(mailbox, '@', 2) WHERE domain='';"); +} function upgrade_1767() { # 'active' was just added, so make sure all existing jobs stay active