fix: use two column as unique constraint
This commit is contained in:
parent
50ed9f4a6a
commit
bfa0f32874
|
|
@ -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 view_id
|
||||
ALTER TABLE public.af_published_collab
|
||||
ADD CONSTRAINT unique_workspace_id_publish_name UNIQUE (workspace_id, publish_name);
|
||||
Loading…
Reference in New Issue