Add eventId to notifications table

This commit is contained in:
Johannes Zellner
2019-01-19 13:21:09 +01:00
parent c73b30556f
commit 3262486a96
3 changed files with 15 additions and 11 deletions

View File

@@ -215,12 +215,14 @@ CREATE TABLE IF NOT EXISTS tasks(
CREATE TABLE IF NOT EXISTS notifications(
id int NOT NULL AUTO_INCREMENT,
userId VARCHAR(128) NOT NULL,
eventId VARCHAR(128) NOT NULL,
title VARCHAR(512) NOT NULL,
message TEXT,
action VARCHAR(512) NOT NULL,
acknowledged BOOLEAN DEFAULT false,
creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (eventId) REFERENCES eventlog(id),
PRIMARY KEY (id)
);