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:
42
schema/skills.dbml
Normal file
42
schema/skills.dbml
Normal file
@@ -0,0 +1,42 @@
|
||||
Table agent_skills {
|
||||
id uuid [pk, default: `gen_random_uuid()`]
|
||||
name text [unique, not null]
|
||||
description text [not null, default: '']
|
||||
content text [not null]
|
||||
tags "text[]" [not null, default: `'{}'`]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
updated_at timestamptz [not null, default: `now()`]
|
||||
}
|
||||
|
||||
Table agent_guardrails {
|
||||
id uuid [pk, default: `gen_random_uuid()`]
|
||||
name text [unique, not null]
|
||||
description text [not null, default: '']
|
||||
content text [not null]
|
||||
severity text [not null, default: 'medium']
|
||||
tags "text[]" [not null, default: `'{}'`]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
updated_at timestamptz [not null, default: `now()`]
|
||||
}
|
||||
|
||||
Table project_skills {
|
||||
project_id uuid [not null, ref: > projects.guid]
|
||||
skill_id uuid [not null, ref: > agent_skills.id]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
(project_id, skill_id) [pk]
|
||||
project_id
|
||||
}
|
||||
}
|
||||
|
||||
Table project_guardrails {
|
||||
project_id uuid [not null, ref: > projects.guid]
|
||||
guardrail_id uuid [not null, ref: > agent_guardrails.id]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
(project_id, guardrail_id) [pk]
|
||||
project_id
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user