Skip to content

fix: update foreign key handling to use 'reference'#25

Merged
AxiosLeo merged 5 commits intomainfrom
fix/migration-foreign-key-references
Feb 23, 2026
Merged

fix: update foreign key handling to use 'reference'#25
AxiosLeo merged 5 commits intomainfrom
fix/migration-foreign-key-references

Conversation

@AxiosLeo
Copy link
Owner

@AxiosLeo AxiosLeo commented Feb 23, 2026

instead of 'reference' for consistency and compatibility


Note

Low Risk
Mostly a naming/compatibility change in SQL generation for foreign keys; risk is limited to callers that still pass reference and could hit validation/undefined access if not covered.

Overview
Foreign key definitions are standardized to use references instead of reference in ManageSQLBuilder.

createForeignKey and table createColumns now validate/render from options.references and normalize onDelete/onUpdate (defaulting to NO ACTION), while createColumns and migration.createForeignKey accept the legacy reference field by mapping it to references. Tests were updated to use references and a new test was added to ensure legacy reference still works.

Written by Cursor Bugbot for commit ac909d1. This will update automatically on new commits. Configure here.

…es' instead of 'reference' for consistency and compatibility
@AxiosLeo AxiosLeo changed the title fix(builder, migration): update foreign key handling to use 'referenc… fix: update foreign key handling to use 'referenc… Feb 23, 2026
@AxiosLeo AxiosLeo changed the title fix: update foreign key handling to use 'referenc… fix: update foreign key handling to use 'reference' Feb 23, 2026
…e legacy reference property in createColumns
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@AxiosLeo AxiosLeo merged commit cd38585 into main Feb 23, 2026
13 checks passed
@AxiosLeo AxiosLeo deleted the fix/migration-foreign-key-references branch February 23, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant