mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
upgrade.php:
- split upgrade_1763() into mysql and pgsql versions because pgsql doesn't support SUBSTRING_INDEX (reported by darix on IRC) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1786 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
1 parent
b3750272e4
commit
7f87d130d7
1 file changed
+5
-1
+5
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user