-- Needed for people merge.
CREATE INDEX packagesetgroup__owner__idx ON PackageSetGroup(owner);
Otherwise looks fine (if a little unreadable - this looks like the output of pg_dump and doesn't use shortcuts like 'SERIAL PRIMARY KEY' or defining constraints inline with the table definition).
We need an index on packagesetgroup .owner:
-- Needed for people merge. __owner_ _idx ON PackageSetGroup (owner) ;
CREATE INDEX packagesetgroup
Otherwise looks fine (if a little unreadable - this looks like the output of pg_dump and doesn't use shortcuts like 'SERIAL PRIMARY KEY' or defining constraints inline with the table definition).