add EventHandlerRepo (probably has bugs)

This commit is contained in:
2021-09-20 18:31:32 +02:00
parent b2c9cca400
commit 1cf8c019e5
5 changed files with 179 additions and 30 deletions
+21
View File
@@ -0,0 +1,21 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE event_handler
(
id INT NOT NULL AUTO_INCREMENT,
event_name VARCHAR(255) NOT NULL,
one_shot TINYINT NOT NULL DEFAULT 0,
priority INT NOT NULL DEFAULT 0,
target_kind VARCHAR(255) NOT NULL,
target_value VARCHAR(255) NOT NULL,
conditions JSON NOT NULL,
actions JSON NOT NULL,
PRIMARY KEY (id)
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE event_handler;
-- +goose StatementEnd