up.sql 172 B

1234
  1. -- First remove the previous primary key
  2. ALTER TABLE devices DROP CONSTRAINT devices_pkey;
  3. -- Add a new combined one
  4. ALTER TABLE devices ADD PRIMARY KEY (uuid, user_uuid);