forked from laysense/laysite
Seed editable default header and footer pages
This commit is contained in:
@@ -11,7 +11,7 @@ use Throwable;
|
||||
|
||||
final class Database
|
||||
{
|
||||
private const SCHEMA_VERSION = 4;
|
||||
private const SCHEMA_VERSION = 5;
|
||||
// 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';
|
||||
@@ -88,6 +88,8 @@ final class Database
|
||||
$pdo->exec('ALTER TABLE pages ADD COLUMN layout_id INTEGER REFERENCES design_presets(id)');
|
||||
}
|
||||
$pdo->exec('CREATE UNIQUE INDEX IF NOT EXISTS pages_layout_id ON pages(layout_id)');
|
||||
}
|
||||
if ($version < 5) {
|
||||
LayoutPage::migrate($pdo);
|
||||
}
|
||||
if ($version < self::SCHEMA_VERSION) {
|
||||
|
||||
Reference in New Issue
Block a user