SF.net SVN: postfixadmin:[1626] trunk/upgrade.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <gin...@us...> - 2014-01-14 16:03:39
|
Revision: 1626
http://sourceforge.net/p/postfixadmin/code/1626
Author: gingerdog
Date: 2014-01-14 16:03:36 +0000 (Tue, 14 Jan 2014)
Log Message:
-----------
upgrade.php : fix postgres complaining about addition of boolean not null field when existing data exists and no default is specified
Modified Paths:
--------------
trunk/upgrade.php
Modified: trunk/upgrade.php
===================================================================
--- trunk/upgrade.php 2014-01-14 16:02:03 UTC (rev 1625)
+++ trunk/upgrade.php 2014-01-14 16:03:36 UTC (rev 1626)
@@ -1310,10 +1310,14 @@
db_query_parsed(_add_index('log', 'domain_timestamp', 'domain,timestamp'));
}
-function upgrade_1283() {
+function upgrade_1283_mysql() {
_db_add_field('admin', 'superadmin', '{BOOLEAN}', 'password');
}
+function upgrade_1283_pgsql() { /* postgresql doesn't like adding columns which can't be null when there is data already there. */
+ _db_add_field('admin', 'superadmin', "{BOOLEAN} DEFAULT '{BOOL_TRUE}'", 'password');
+}
+
function upgrade_1284() {
# migrate the ALL domain to the superadmin column
# Note: The ALL domain is not (yet) deleted to stay backwards-compatible for now (will be done in a later upgrade function)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|