Composite keys create multiple columns entry
Created by: stubar
Steps to reproduce: Create a table like so...
CREATE TABLE "tableWithCompositeKey" (
"key1" int2 NOT NULL DEFAULT NULL,
"key2" int2 NOT NULL DEFAULT NULL,
"someField" varchar (20),
PRIMARY KEY(key1, key2)
)
;
the columns array in massive will represent this as
["someField","key1","key2","key1","key2","someField"]
I think the fix is to add a DISTINCT
to the columns array_agg
in tables.sql. Happy to raise a PR fix for this.