From 03b8ecd0deacf1aa3a7e16fef19cea7b2d270126 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 28 May 2017 17:54:05 +0200 Subject: fix update_r1189() for mysql and postgres --- install/update.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/update.php b/install/update.php index 06084a422..f9f1d0a3c 100644 --- a/install/update.php +++ b/install/update.php @@ -2524,8 +2524,13 @@ function update_r1188() { function update_r1189() { $r1 = q("alter table mail add mail_mimetype varchar(64) not null default 'text/bbcode' "); - $r2 = q("alter table mail add mail_raw int(4) not null default '0' "); + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r2 = q("alter table mail add mail_raw smallint not null default 0 "); + } + else { + $r2 = q("alter table mail add mail_raw tinyint(4) not null default 0 "); + } if($r1 && $r2) return UPDATE_SUCCESS; return UPDATE_FAILED; -- cgit v1.2.3