8 lines
242 B
MySQL
8 lines
242 B
MySQL
|
-- 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;
|