diff options
Diffstat (limited to 'storage/migrations')
-rw-r--r-- | storage/migrations/001_init.up.sql | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/storage/migrations/001_init.up.sql b/storage/migrations/001_init.up.sql index 1b3e63d..8980ccf 100644 --- a/storage/migrations/001_init.up.sql +++ b/storage/migrations/001_init.up.sql @@ -1,7 +1,16 @@ -CREATE TABLE IF NOT EXISTS chat ( +CREATE TABLE IF NOT EXISTS chats ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, - msgs TEXT NOT NULL, -- Store messages as a comma-separated string + msgs TEXT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); + +CREATE TABLE IF NOT EXISTS memories ( + agent TEXT NOT NULL, + topic TEXT NOT NULL, + mind TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (agent, topic) +); |