aboutsummaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-06-20 20:36:25 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-06-20 20:36:25 +0200
commit9bab99871d5054de8dad50fc331a7177060f88e9 (patch)
tree8a42bf4be98b10a6c998aa045d6ede1b03eceb3d /schema.sql
parent32ad074786f905b919999c1ff2fb7b3993cc7fad (diff)
server: Add firebase user foreign key in schema
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/schema.sql b/schema.sql
index 55fe091..1592bdd 100644
--- a/schema.sql
+++ b/schema.sql
@@ -38,6 +38,7 @@ create index messages_time_index on Messages(time);
create table Firebase (
user integer,
- token text
+ token text,
+ foreign key(user) references Users(id) on delete cascade
);
create index firebase_user_index on Firebase(user);