-- Add index/constraint on site and collection slug
CREATE UNIQUE INDEX collections_site_slug_idx
ON collections (site, slug);

ALTER TABLE collections
ADD CONSTRAINT collections_site_slug_unique UNIQUE
USING INDEX collections_site_slug_idx;
