apollo-backend/migrations/20210509200230_create_devices_accounts.up.sql
Andre Medeiros 7fad5ac9e4 initial pass
2021-05-09 20:51:15 -04:00

7 lines
349 B
SQL

CREATE TABLE IF NOT EXISTS devices_accounts (
id SERIAL PRIMARY KEY,
account_id integer,
device_id integer
);
CREATE UNIQUE INDEX IF NOT EXISTS devices_accounts_pkey ON devices_accounts(id int4_ops);
CREATE UNIQUE INDEX IF NOT EXISTS devices_accounts_account_id_device_id_idx ON devices_accounts(account_id int4_ops,device_id int4_ops);