-- constraints

ALTER TABLE USERS
ADD CONSTRAINT username_unique UNIQUE (USERNAME);


-- defaults

CREATE EXTENSION "uuid-ossp";

ALTER TABLE USERS
ALTER COLUMN UUID SET DEFAULT gen_uuid();

ALTER TABLE BIDS
ALTER COLUMN UUID SET DEFAULT gen_uuid();

ALTER TABLE CHARGES
ALTER COLUMN UUID SET DEFAULT gen_uuid();

ALTER TABLE ITEMS
ALTER COLUMN UUID SET DEFAULT gen_uuid();

ALTER TABLE TRANSACTIONS
ALTER COLUMN UUID SET DEFAULT gen_uuid();

COMMIT;
