forked from laysense/laysense.cn
Add whole-page template collections and Caddy examples
This commit is contained in:
@@ -54,6 +54,10 @@ final class Database
|
||||
$pdo->exec("ALTER TABLE $table ADD COLUMN alignments TEXT NOT NULL DEFAULT '{}'");
|
||||
}
|
||||
}
|
||||
$pageColumns = array_column($pdo->query('PRAGMA table_info(pages)')->fetchAll(), 'name');
|
||||
if (!in_array('theme', $pageColumns, true)) {
|
||||
$pdo->exec("ALTER TABLE pages ADD COLUMN theme TEXT NOT NULL DEFAULT ''");
|
||||
}
|
||||
$site = $pdo->prepare('INSERT OR IGNORE INTO site_settings (id, payload) VALUES (1, ?)');
|
||||
$site->execute([self::json($seed['site'])]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user