Add push notifications and device token management

This commit is contained in:
Ben Goldsworthy 2020-11-30 17:34:13 +00:00
parent 9d4c736d95
commit bb161dfd25
14 changed files with 5320 additions and 6 deletions

View file

@ -0,0 +1,30 @@
-- Convert schema 'share/ddl/_source/deploy/32/001-auto.yml' to 'share/ddl/_source/deploy/33/001-auto.yml':;
;
BEGIN;
;
CREATE TABLE device_subscriptions (
id INTEGER PRIMARY KEY NOT NULL,
device_token_id integer NOT NULL,
topic_id integer NOT NULL,
FOREIGN KEY (device_token_id) REFERENCES device_tokens(id) ON DELETE NO ACTION ON UPDATE NO ACTION,
FOREIGN KEY (topic_id) REFERENCES topics(id) ON DELETE NO ACTION ON UPDATE NO ACTION
);
;
CREATE INDEX device_subscriptions_idx_device_token_id ON device_subscriptions (device_token_id);
;
CREATE INDEX device_subscriptions_idx_topic_id ON device_subscriptions (topic_id);
;
CREATE TABLE topics (
id INTEGER PRIMARY KEY NOT NULL,
name varchar(200) NOT NULL
);
;
COMMIT;