gbserver/src/scripts/database/0002.sql

12 lines
314 B
MySQL
Raw Normal View History

2025-08-16 18:13:03 -03:00
CREATE TABLE system_automations (
id uuid PRIMARY KEY,
kind NUMBER,
target VARCHAR(32),
schedule CHAR(6),
param VARCHAR(32) NOT NULL,
is_active BOOL NOT NULL DEFAULT TRUE,
last_triggered TIMESTAMPTZ
);
CREATE INDEX idx_active_automations ON system_automations(kind) WHERE is_active;