Allow eventId in notifications table to be null

This commit is contained in:
Johannes Zellner
2019-02-06 14:39:25 +01:00
parent abc8e1c377
commit 0cca838db9
3 changed files with 39 additions and 2 deletions

View File

@@ -215,14 +215,13 @@ 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,
eventId VARCHAR(128),
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)
);