forked from laysense/laysite
Prepare LaySite 1.4.5 site icons, Head settings and release images
This commit is contained in:
@@ -11,7 +11,7 @@ use Throwable;
|
||||
|
||||
final class Database
|
||||
{
|
||||
private const SCHEMA_VERSION = 7;
|
||||
private const SCHEMA_VERSION = 8;
|
||||
// Avoid reusing a deleted ID that may still be open in an editing form.
|
||||
public const NEXT_ARTICLE_ID = 'MAX(COALESCE((SELECT MAX(id) FROM articles), 0),
|
||||
COALESCE((SELECT MAX(article_id) FROM article_deletions), 0)) + 1';
|
||||
@@ -92,6 +92,9 @@ final class Database
|
||||
if ($version < 6 && !in_array('page_type', array_column($pdo->query('PRAGMA table_info(pages)')->fetchAll(), 'name'), true)) {
|
||||
$pdo->exec("ALTER TABLE pages ADD COLUMN page_type TEXT NOT NULL DEFAULT 'page' CHECK (page_type IN ('page', 'maintenance', 'not-found'))");
|
||||
}
|
||||
if ($version < 8 && !in_array('head_html', array_column($pdo->query('PRAGMA table_info(pages)')->fetchAll(), 'name'), true)) {
|
||||
$pdo->exec("ALTER TABLE pages ADD COLUMN head_html TEXT NOT NULL DEFAULT ''");
|
||||
}
|
||||
if ($version < 5) {
|
||||
LayoutPage::migrate($pdo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user