SF.net SVN: postfixadmin:[1605] trunk/upgrade.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <chr...@us...> - 2013-12-08 22:12:27
|
Revision: 1605
http://sourceforge.net/p/postfixadmin/code/1605
Author: christian_boltz
Date: 2013-12-08 22:12:24 +0000 (Sun, 08 Dec 2013)
Log Message:
-----------
upgrade.php:
- change {BIGINT} to include "NOT NULL DEFAULT 0"
- add {INT} (not used anywhere yet)
- upgrade_729:
- quota2 table: change "{BIGINT} NOT NULL DEFAULT 0" to "{BIGINT}" to
match the above change
- note: quota table created with old versions of upgrade.php will not
have explicit "NOT NULL DEFAULT 0" for the "current" field
(shouldn't hurt)
Modified Paths:
--------------
trunk/upgrade.php
Modified: trunk/upgrade.php
===================================================================
--- trunk/upgrade.php 2013-12-08 21:30:30 UTC (rev 1604)
+++ trunk/upgrade.php 2013-12-08 22:12:24 UTC (rev 1605)
@@ -204,7 +204,8 @@
'{RENAME_COLUMN}' => 'CHANGE COLUMN',
'{MYISAM}' => 'ENGINE=MyISAM',
'{INNODB}' => 'ENGINE=InnoDB',
- '{BIGINT}' => 'bigint',
+ '{INT}' => 'integer NOT NULL DEFAULT 0',
+ '{BIGINT}' => 'bigint NOT NULL DEFAULT 0',
'{DATE}' => "timestamp NOT NULL default '2000-01-01'", # MySQL needs a sane default (no default is interpreted as CURRENT_TIMESTAMP, which is ...
'{DATECURRENT}' => 'timestamp NOT NULL default CURRENT_TIMESTAMP', # only allowed once per table in MySQL
);
@@ -223,7 +224,8 @@
'{RENAME_COLUMN}' => 'ALTER COLUMN', # PgSQL : ALTER TABLE x RENAME x TO y
'{MYISAM}' => '',
'{INNODB}' => '',
- '{BIGINT}' => 'bigint',
+ '{INT}' => 'integer NOT NULL DEFAULT 0',
+ '{BIGINT}' => 'bigint NOT NULL DEFAULT 0',
'int(1)' => 'int',
'int(10)' => 'int',
'int(11)' => 'int',
@@ -1208,7 +1210,7 @@
db_query_parsed("
CREATE TABLE {IF_NOT_EXISTS} $table_quota2 (
username VARCHAR(100) {LATIN1} NOT NULL,
- bytes {BIGINT} NOT NULL DEFAULT 0,
+ bytes {BIGINT},
messages integer NOT NULL DEFAULT 0,
PRIMARY KEY (username)
) {MYISAM} ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|