postgresql ·

Add a unique constraint in postgres

ALTER TABLE <table_name> ADD CONSTRAINT <constraint_name> UNIQUE (column1, column2);