feat(db): SQLite 连接与迁移框架(embed 迁移/事务校验/PG 预留 M4)
This commit is contained in:
1 parent
dd16176bb7
commit
34cac241c1
6 files changed
+726
No files matched your search
@@ -0,0 +1,16 @@
|
||||
-- 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'))
|
||||
);
|
||||
Reference in new issue
Block a user