Files
amcs/schema/skills.dbml
SGC 6c6b49b45c fix: add cross-file Ref declarations for relspecgo merge
- Add explicit Ref: blocks at bottom of each DBML file for cross-file FK relationships
- files.dbml: stored_files → thoughts, projects
- skills.dbml: project_skills/project_guardrails → projects
- meta.dbml: chat_histories → projects
- Update Makefile to use the relspec merge workflow where applicable
- Regenerate 020_generated_schema.sql with proper cross-file constraints

Addresses review comment on PR #20
2026-04-04 15:13:50 +02:00

47 lines
1.3 KiB
Plaintext

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
}
}
// Cross-file refs (for relspecgo merge)
Ref: project_skills.project_id > projects.guid [delete: cascade]
Ref: project_guardrails.project_id > projects.guid [delete: cascade]