Files

17 lines
772 B
SQL

-- 0001_init: M0 migration-framework placeholder.
--
-- Creates a small, harmless key/value table so the migration plumbing
-- (embed -> load -> apply in a transaction -> record in schema_migrations)
-- can be exercised end to end. Real tables (messages, memories, sessions,
-- personas, ...) are added as their own timestamped migrations in later
-- milestones; this placeholder is NOT a domain table.
--
-- Note: key is the primary key on purpose — this is a key/value metadata
-- table, so it intentionally deviates from the "id primary key" convention
-- that applies to domain tables.
CREATE TABLE IF NOT EXISTS app_meta (
key TEXT PRIMARY KEY,
value TEXT NOT NULL,
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now'))
);