db: allow multiple identical events

This commit is contained in:
nemunaire 2018-01-23 01:27:31 +01:00
parent e02e98f8f3
commit 3c8f9e55b6
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ func DBCreate() error {
if _, err := db.Exec(`
CREATE TABLE IF NOT EXISTS events(
id_event INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
txt VARCHAR(255) NOT NULL UNIQUE,
txt VARCHAR(255) NOT NULL,
kind ENUM('alert-primary', 'alert-secondary', 'alert-success', 'alert-danger', 'alert-warning', 'alert-info', 'alert-light', 'alert-dark') NOT NULL,
time TIMESTAMP NOT NULL
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;