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
This commit is contained in:
@@ -19,3 +19,7 @@ Table stored_files {
|
||||
sha256
|
||||
}
|
||||
}
|
||||
|
||||
// Cross-file refs (for relspecgo merge)
|
||||
Ref: stored_files.thought_id > thoughts.guid [delete: set null]
|
||||
Ref: stored_files.project_id > projects.guid [delete: set null]
|
||||
|
||||
@@ -27,3 +27,6 @@ Table tool_annotations {
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
updated_at timestamptz [not null, default: `now()`]
|
||||
}
|
||||
|
||||
// Cross-file refs (for relspecgo merge)
|
||||
Ref: chat_histories.project_id > projects.guid [delete: set null]
|
||||
|
||||
@@ -40,3 +40,7 @@ Table project_guardrails {
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user