diff options
author | Grail Finder <wohilas@gmail.com> | 2024-11-20 20:47:49 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2024-11-20 20:47:49 +0300 |
commit | 5ccad20bd680dc443b30f0decc8fca13427dc70d (patch) | |
tree | 5ed20ce680c09609a29f880cf41c976301f3e031 /storage/migrations/001_init.up.sql | |
parent | fc517c2c69d96501f1adc5a021b39b9eff22e4d7 (diff) |
Feat: add memory [wip]
Diffstat (limited to 'storage/migrations/001_init.up.sql')
-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) +); |