From acfc4e57f8ec0a8f09a2996b30a4dda7204bc6d2 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Fri, 18 Feb 2011 21:59:42 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@968 a1433add-5e2c-0410-b055-b7f2511e0802 --- upgrade.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/upgrade.php b/upgrade.php index dd9634ee..f658b6a7 100644 --- a/upgrade.php +++ b/upgrade.php @@ -1289,11 +1289,19 @@ function upgrade_946() { _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