work_order_actionsStores ordered actions attached to Work Orders.
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
work_order_id |
TEXT |
no | none | Parent Work Order. References work_orders(id). |
position |
INTEGER |
no | none | Ordered action position. |
type |
TEXT |
no | none | Action type, for example remove_name. |
host_fqdn |
TEXT |
yes | NULL |
Target host if resolved. References hosts(fqdn). |
host_legacy_id |
TEXT |
no | '' |
Compatibility target ID from old Work Order format. |
name |
TEXT |
no | '' |
Target name for action. |
payload |
TEXT |
no | '' |
Reserved structured payload field. |
(work_order_id, position)work_order_id references work_orders(id) with ON UPDATE CASCADE ON DELETE CASCADEhost_fqdn references hosts(fqdn) with ON UPDATE CASCADE ON DELETE SET NULLCREATE TABLE IF NOT EXISTS work_order_actions (
work_order_id TEXT NOT NULL,
position INTEGER NOT NULL,
type TEXT NOT NULL,
host_fqdn TEXT,
host_legacy_id TEXT NOT NULL DEFAULT '',
name TEXT NOT NULL DEFAULT '',
payload TEXT NOT NULL DEFAULT '',
PRIMARY KEY (work_order_id, position),
FOREIGN KEY (work_order_id) REFERENCES work_orders(id) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (host_fqdn) REFERENCES hosts(fqdn) ON UPDATE CASCADE ON DELETE SET NULL
);