feat: DBML schema files + relspecgo migration generation #20
Reference in New Issue
Block a user
Delete Branch "feat/dbml-schema-relspecgo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.