diff options
author | zotlabs <mike@macgirvin.com> | 2016-10-17 16:10:32 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-10-17 16:10:32 -0700 |
commit | 6c7972470be056b650ac9bc66c4ccd307729dd11 (patch) | |
tree | 5aa16ad900f8cd2757af12317d35dc90ca5b94a8 /install | |
parent | 40ce6724a9b1c619261319d23468d7eb312353eb (diff) | |
download | volse-hubzilla-6c7972470be056b650ac9bc66c4ccd307729dd11.tar.gz volse-hubzilla-6c7972470be056b650ac9bc66c4ccd307729dd11.tar.bz2 volse-hubzilla-6c7972470be056b650ac9bc66c4ccd307729dd11.zip |
if we have to go through this contortion every time we change a DB column from unsigned to signed...
Diffstat (limited to 'install')
-rw-r--r-- | install/update.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index f13243a93..fc6641c55 100644 --- a/install/update.php +++ b/install/update.php @@ -2449,7 +2449,10 @@ function update_r1182() { function update_r1183() { if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { - $r1 = q("alter table hook ALTER priority priority smallint NOT NULL DEFAULT '0' "); + $r1 = q("alter table hook ALTER COLUMN priority TYPE smallint"); + $r2 = q("alter table hook ALTER COLUMN priority SET NOT NULL"); + $r3 = q("alter table hook ALTER COLUMN priority SET DEFAULT '0'"); + $r1 = $r1 && $r2 && $r3; } else { $r1 = q("alter table hook CHANGE priority priority smallint NOT NULL DEFAULT '0' "); |