mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-10 22:17:44 +00:00
f9b9c595cf
* some tests * more tests * tidy up go.mod * more tests * add postgres * beep * again * Set up schema * fix device test
15 lines
579 B
SQL
15 lines
579 B
SQL
-- 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);
|
|
|