mabel/migrations/20230713114832_add-collection-constraint.up.sql
Hamcha 203df76d6c
Some checks failed
continuous-integration/drone/push Build is failing
add collections and private posts
2023-07-13 14:08:26 +02:00

7 lines
242 B
SQL

-- 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;