Merge pull request #659 from AppFlowy-IO/fix/publish-name-uniq

fix: use two column as unique constraint
This commit is contained in:
Zack 2024-06-27 19:16:47 +08:00 committed by GitHub
commit 59b2fefee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
-- Drop the existing unique constraint on publish_name
ALTER TABLE public.af_published_collab
DROP CONSTRAINT unique_publish_name;
-- Add a new unique constraint for the combination of publish_name and workspace_id
ALTER TABLE public.af_published_collab
ADD CONSTRAINT unique_workspace_id_publish_name UNIQUE (workspace_id, publish_name);