add script triggers.

This commit is contained in:
2023-08-29 21:00:29 +02:00
parent 8776ed6df3
commit e8b77ae69c
16 changed files with 434 additions and 27 deletions
@@ -0,0 +1,18 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE script_trigger (
id CHAR(36) NOT NULL PRIMARY KEY,
event VARCHAR(255) NOT NULL,
device_match TEXT NOT NULL,
parameter TEXT NOT NULL,
script_target TEXT NOT NULL,
script_name VARCHAR(255) NOT NULL,
script_pre JSON NOT NULL,
script_post JSON NOT NULL
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS script_trigger;
-- +goose StatementEnd