Skip to content

fix(mssql): only last column in foreign key definition kept#1

Open
gnarlex wants to merge 1 commit intonathanael-ruf:mainfrom
gnarlex:mssql-multi-fkey
Open

fix(mssql): only last column in foreign key definition kept#1
gnarlex wants to merge 1 commit intonathanael-ruf:mainfrom
gnarlex:mssql-multi-fkey

Conversation

@gnarlex
Copy link

@gnarlex gnarlex commented Jul 5, 2024

For SQL Server, when copying foreign keys with multiple columns, only the last column is taken over.

The original code tried to aggregate columns in-place, but it seems that some part of the code does not retrieve the original, but rather creates a new list/foreign key object.

Adjust the SQL query, to do the column name aggregation. Then we can avoid having the lisp code to in-place update magic.
(Similar to how it's done in the other DB kind code.)

(I suppose there's great potential to unify the code.)

@gnarlex gnarlex force-pushed the mssql-multi-fkey branch from 8ac19b0 to 1a97cc4 Compare July 5, 2024 15:37
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