Add notificationdb table and db wrapper

This commit is contained in:
Johannes Zellner
2018-12-17 15:52:52 +01:00
parent a5245fda65
commit fc8dcec2bb
3 changed files with 144 additions and 1 deletions

View File

@@ -212,5 +212,16 @@ CREATE TABLE IF NOT EXISTS tasks(
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id));
CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE IF NOT EXISTS notifications(
id int NOT NULL AUTO_INCREMENT,
userId 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,
PRIMARY KEY (id)
);
CHARACTER SET utf8 COLLATE utf8_bin;