if we have to go through this contortion every time we change a DB column from unsigned to signed...

This commit is contained in:
zotlabs 2016-10-17 16:10:32 -07:00
parent 40ce6724a9
commit 6c7972470b

View File

@ -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' ");