SF.net SVN: postfixadmin:[968] trunk/upgrade.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <chr...@us...> - 2011-02-18 21:59:49
|
Revision: 968
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=968&view=rev
Author: christian_boltz
Date: 2011-02-18 21:59:42 +0000 (Fri, 18 Feb 2011)
Log Message:
-----------
upgrade.php:
- PostgreSQL: change domain.quota, domain.maxquota and mailbox.quota to bigint
reported by oliver (n0d3 @SF),
https://sourceforge.net/tracker/?func=detail&aid=3057081&group_id=191583&atid=937964
Note: MySQL has bigint field since r169.
Modified Paths:
--------------
trunk/upgrade.php
Modified: trunk/upgrade.php
===================================================================
--- trunk/upgrade.php 2011-02-18 20:32:14 UTC (rev 967)
+++ trunk/upgrade.php 2011-02-18 21:59:42 UTC (rev 968)
@@ -1289,11 +1289,19 @@
_db_add_field('vacation', 'activefrom', '{DATE}', 'body');
_db_add_field('vacation', 'activeuntil', '{DATE}', 'activefrom');
}
+function upgrade_968_pgsql() {
+ # pgsql counterpart for upgrade_169_mysql() - allow really big quota
+ $table_domain = table_by_key ('domain');
+ $table_mailbox = table_by_key('mailbox');
+ db_query_parsed("ALTER TABLE $table_domain ALTER COLUMN quota type bigint");
+ db_query_parsed("ALTER TABLE $table_domain ALTER COLUMN maxquota type bigint");
+ db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN quota type bigint");
+}
-
# TODO MySQL:
# - various varchar fields do not have a default value
# https://sourceforge.net/projects/postfixadmin/forums/forum/676076/topic/3419725
# - change default of all timestamp fields to {DATECURRENT} (CURRENT_TIMESTAMP} or {DATE}
# including vacation.activefrom/activeuntil (might have a different default as leftover from upgrade_727_mysql)
+# including vacation.modified - should be {DATE}, not {DATECURRENT}
# https://sourceforge.net/tracker/?func=detail&aid=1699218&group_id=191583&atid=937964
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|