feat: add DBML schema files and relspecgo migration generation
- Add schema/*.dbml covering all existing tables (001-019) - Wire relspecgo via make generate-migrations target - Add make check-schema-drift for CI drift detection - Add schema/README.md documenting the DBML-first workflow Closes #19
This commit is contained in:
29
schema/meta.dbml
Normal file
29
schema/meta.dbml
Normal file
@@ -0,0 +1,29 @@
|
||||
Table chat_histories {
|
||||
id uuid [pk, default: `gen_random_uuid()`]
|
||||
session_id text [not null]
|
||||
title text
|
||||
channel text
|
||||
agent_id text
|
||||
project_id uuid [ref: > projects.guid]
|
||||
messages jsonb [not null, default: `'[]'`]
|
||||
summary text
|
||||
metadata jsonb [not null, default: `'{}'`]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
updated_at timestamptz [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
session_id
|
||||
project_id
|
||||
channel
|
||||
agent_id
|
||||
created_at
|
||||
}
|
||||
}
|
||||
|
||||
Table tool_annotations {
|
||||
id bigserial [pk]
|
||||
tool_name text [unique, not null]
|
||||
notes text [not null, default: '']
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
updated_at timestamptz [not null, default: `now()`]
|
||||
}
|
||||
Reference in New Issue
Block a user