Skip to content

fix(builder): enhance createForeignKey to support onCreateTable option#26

Merged
AxiosLeo merged 3 commits intomainfrom
fix/builder-foreign-key
Feb 23, 2026
Merged

fix(builder): enhance createForeignKey to support onCreateTable option#26
AxiosLeo merged 3 commits intomainfrom
fix/builder-foreign-key

Conversation

@AxiosLeo
Copy link
Owner

@AxiosLeo AxiosLeo commented Feb 23, 2026

Note

Medium Risk
Touches SQL generation for foreign keys and option validation/normalization, so regressions could break migrations or produce invalid DDL for some input shapes despite added test coverage.

Overview
Adds an onCreateTable mode to ManageSQLBuilder.createForeignKey so foreign keys can be rendered inline as CONSTRAINT ... clauses during CREATE TABLE, while keeping the existing ALTER TABLE ... ADD CONSTRAINT path for standalone operations.

Standardizes foreign-key option naming to table/column under references (and table/column for the target as well), with backward-compatible support for deprecated reference and tableName/columnName inputs across the builder, migrations API, and TypeScript definitions; tests are updated/added to cover both modern and legacy formats.

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

@AxiosLeo AxiosLeo changed the title fix(builder): enhance createForeignKey to support onCreateTable option and standardize reference property names fix(builder): enhance createForeignKey to support onCreateTable option Feb 23, 2026
…d reference properties and ensure compatibility with new references structure
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.

… option and ensure proper assignment of reference properties
@AxiosLeo AxiosLeo merged commit bd09381 into main Feb 23, 2026
13 checks passed
@AxiosLeo AxiosLeo deleted the fix/builder-foreign-key branch February 23, 2026 15:45
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