From 89f5d5524fd271086878801a8672a1567b90273d Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 26 Oct 2020 16:54:08 +0000 Subject: [PATCH] pg fixes --- ext/wiki/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/wiki/main.php b/ext/wiki/main.php index 89068a45..f882aae1 100644 --- a/ext/wiki/main.php +++ b/ext/wiki/main.php @@ -155,8 +155,8 @@ class Wiki extends Extension $database->execute("ALTER TABLE wiki_pages SET locked = (locked IN ('Y', 1))"); } if ($d == DatabaseDriver::PGSQL) { - $database->execute("ALTER TABLE wiki_pages ADD COLUMN locked_b BOOLEAN DEFAULT FALSE NOT NULL AFTER locked"); - $database->execute("UPDATE wiki_pages SET locked_b = (locked IN ('Y', 1))"); + $database->execute("ALTER TABLE wiki_pages ADD COLUMN locked_b BOOLEAN DEFAULT FALSE NOT NULL"); + $database->execute("UPDATE wiki_pages SET locked_b = (locked = 'Y')"); $database->execute("ALTER TABLE wiki_pages DROP COLUMN locked"); $database->execute("ALTER TABLE wiki_pages RENAME COLUMN locked_b TO locked"); }