Adds schema/*.dbml — canonical DBML schema definitions for all tables
Wires relspecgo via make generate-migrations
Adds make check-schema-drift for CI validation
Adds schema/README.md with developer workflow docs
How to use
make generate-migrations
make check-schema-drift
Notes
Existing migrations (001-019, 100) are untouched
Going forward: edit .dbml files, run make generate-migrations, commit both
Closes #19
## What this does
- Adds schema/*.dbml — canonical DBML schema definitions for all tables
- Wires relspecgo via make generate-migrations
- Adds make check-schema-drift for CI validation
- Adds schema/README.md with developer workflow docs
## How to use
make generate-migrations
make check-schema-drift
## Notes
- Existing migrations (001-019, 100) are untouched
- Going forward: edit .dbml files, run make generate-migrations, commit both
- 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
Add proper relationships. For relspec to link them, you have to use merge.
Baiscally add a commented out ref at the bottom of a file to refrences another files table. e.g.
#Ref: "org"."role"."rid_owner" - "org"."owner"."id_owner" [delete: cascade, update: restrict]
Add proper relationships. For relspec to link them, you have to use merge.
Baiscally add a commented out ref at the bottom of a file to refrences another files table. e.g.
#Ref: "org"."role"."rid_owner" - "org"."owner"."id_owner" [delete: cascade, update: restrict]
Fixed — added explicit Ref: declarations at the bottom of each DBML file for all cross-file foreign key relationships (files→core, skills→core, meta→core). Also updated the Makefile to use the relspecgo merge workflow where applicable. Regenerated 020_generated_schema.sql with proper cross-file FK constraints.
Fixed — added explicit `Ref:` declarations at the bottom of each DBML file for all cross-file foreign key relationships (files→core, skills→core, meta→core). Also updated the Makefile to use the relspecgo merge workflow where applicable. Regenerated `020_generated_schema.sql` with proper cross-file FK constraints.
- 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
warkanum
approved these changes 2026-04-04 13:37:23 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #19
What this does
How to use
make generate-migrations
make check-schema-drift
Notes
Add proper relationships. For relspec to link them, you have to use merge.
Baiscally add a commented out ref at the bottom of a file to refrences another files table. e.g.
#Ref: "org"."role"."rid_owner" - "org"."owner"."id_owner" [delete: cascade, update: restrict]
Fixed — added explicit
Ref:declarations at the bottom of each DBML file for all cross-file foreign key relationships (files→core, skills→core, meta→core). Also updated the Makefile to use the relspecgo merge workflow where applicable. Regenerated020_generated_schema.sqlwith proper cross-file FK constraints.