mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 05:07:43 +00:00
16 lines
579 B
MySQL
16 lines
579 B
MySQL
|
-- Table Definition ----------------------------------------------
|
||
|
|
||
|
CREATE TABLE devices_accounts (
|
||
|
id SERIAL PRIMARY KEY,
|
||
|
account_id integer REFERENCES accounts(id) ON DELETE CASCADE,
|
||
|
device_id integer REFERENCES devices(id) ON DELETE CASCADE,
|
||
|
watcher_notifiable boolean DEFAULT true,
|
||
|
inbox_notifiable boolean DEFAULT true,
|
||
|
global_mute boolean DEFAULT false
|
||
|
);
|
||
|
|
||
|
-- Indices -------------------------------------------------------
|
||
|
|
||
|
CREATE UNIQUE INDEX devices_accounts_account_id_device_id_idx ON devices_accounts(account_id int4_ops,device_id int4_ops);
|
||
|
|