I have a table with a composite PK (code_id, user_id), that already have 100k records. Is it safe to move from composite PK to a single PK like in the example below?
ALTER TABLE orders
DROP CONSTRAINT pk_code_id_user_id,
ADD COLUMN order_id SERIAL,
ADD CONSTRAINT pk_order_id PRIMARY KEY (order_id);