pgloader
pgloader copied to clipboard
fix(mssql): only last column in foreign key definition kept
For SQL Server, when copying foreign key definitions with multiple columns, only the last of N columns 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.)