This commit is contained in:
Shish 2020-10-26 16:54:08 +00:00
parent 006c53f499
commit 89f5d5524f

View file

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