Accept applied/reverted/failed in device status reports
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

This commit is contained in:
2026-10-05 13:52:07 +11:00
parent 23357b953f
commit f2197c2189
6 changed files with 175 additions and 11 deletions
@@ -0,0 +1,7 @@
-- Last agent apply report per device. reported_generation keeps its meaning
-- (last applied generation); these columns hold the latest report of any kind.
ALTER TABLE devices
ADD COLUMN status TEXT NOT NULL DEFAULT '' CHECK (status IN ('', 'applied', 'reverted', 'failed')),
ADD COLUMN status_generation BIGINT NOT NULL DEFAULT 0,
ADD COLUMN status_error TEXT NOT NULL DEFAULT '',
ADD COLUMN status_at TIMESTAMPTZ;