Con't: store actions as a json in db

This commit is contained in:
Hongbo Wu 2022-11-17 16:22:16 +08:00
parent 845e932d93
commit 8008720712

View file

@ -9,7 +9,7 @@ CREATE TABLE omnivore.rules (
user_id uuid NOT NULL REFERENCES omnivore.user ON DELETE CASCADE,
description text,
query text NOT NULL,
actions text[] NOT NULL,
actions json NOT NULL, -- array of actions of type {type: 'action_type', params: [action_params]}
enabled boolean NOT NULL DEFAULT true,
created_at timestamptz NOT NULL DEFAULT current_timestamp,
updated_at timestamptz NOT NULL DEFAULT current_timestamp