Constraints are not added to migration replay files. #5
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
suggestion
support
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-dbi#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
This is a weird one. Not sure why this is happening but needs some testing.
I had an existing table on which I wanted to add a unique constraint on a column. I did this, then did the snapshot and it appeared to work. The schema.json file was written correctly and a new schema was created successfully from that. However the migration replay file had only a up/create/index entry (no "down" entry at all) and it was missing the "name" and "table" attributes meaning it would cause an error on replay.
added ~152 label
added ~153 label
This issue was not entirely accurate. The constraints we were looking for were ONLY foreign keys. The constraint I could not get added to the migration file was a UNIQUE constraint. I have re-worked a lot of the constraint processing because of issue #4 which has helped fix this issue.
Added 1h of time spent on this issue
This is a major update and will require some changes to existing schema files. Primary keys are now always listed in the constraints, not in the table descriptions.