-- Public wiki pages, written from the dashboard and served without a session (M17) CREATE TABLE IF NOT EXISTS wiki_pages ( id INTEGER PRIMARY KEY AUTOINCREMENT, slug TEXT NOT NULL UNIQUE, title TEXT NOT NULL, summary TEXT, content TEXT NOT NULL DEFAULT '', category TEXT NOT NULL DEFAULT 'Général', position INTEGER NOT NULL DEFAULT 0, published INTEGER NOT NULL DEFAULT 0, -- A legal page is protected from deletion: the bot must always be able to -- point at its terms and its privacy notice. protected INTEGER NOT NULL DEFAULT 0, created_by TEXT, created_at TEXT NOT NULL DEFAULT (datetime('now')), updated_by TEXT, updated_at TEXT NOT NULL DEFAULT (datetime('now')) ); CREATE INDEX IF NOT EXISTS idx_wiki_published ON wiki_pages (published, category, position);