I have a table like so
CREATE TABLE IF NOT EXISTS link_data (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
connection_id UUID NOT NULL,
the_link TEXT NOT NULL,
UNIQUE (connection_id, the_link),
FOREIGN KEY (connection_id)
REFERENCES connection(id)
ON DELETE CASCADE
);
I need to modify the table so it's only unique on connection_id, I.E. UNIQUE (connection_id) how do I alter the table to do it?