ALTER TABLE uploads DROP CONSTRAINT uploads_pkey; ALTER TABLE uploads ADD CONSTRAINT uploads_pkey PRIMARY KEY (id, bucket);