gbserver/scripts/database/0002.sql

12 lines
389 B
MySQL
Raw Normal View History

2025-09-11 14:50:45 -03:00
CREATE TABLE public.system_automations (
id uuid NOT NULL,
kind int4 NULL,
target varchar(32) NULL,
schedule bpchar(12) NULL,
param varchar(32) NOT NULL,
is_active bool DEFAULT true NOT NULL,
last_triggered timestamptz NULL,
CONSTRAINT system_automations_pkey PRIMARY KEY (id)
2025-08-16 18:13:03 -03:00
);
2025-09-11 14:50:45 -03:00
CREATE INDEX idx_active_automations ON public.system_automations USING btree (kind) WHERE is_active;