mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 16:36:51 +00:00
Sincronizou backend e redeployou
X-Lovable-Edit-ID: edt-82daaaa8-15f6-4f84-92c8-47c8127a6298 Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
commit
a004b217d5
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
||||||
|
-- FASE 5 — Observabilidade do runtime de cronjobs
|
||||||
|
|
||||||
|
ALTER TABLE public.scheduled_jobs
|
||||||
|
DROP CONSTRAINT IF EXISTS scheduled_jobs_status_check;
|
||||||
|
|
||||||
|
ALTER TABLE public.scheduled_jobs
|
||||||
|
ADD CONSTRAINT scheduled_jobs_status_check
|
||||||
|
CHECK (status IN ('active', 'paused', 'auto_paused', 'error', 'archived'));
|
||||||
|
|
||||||
|
ALTER TABLE public.scheduled_jobs
|
||||||
|
ADD COLUMN IF NOT EXISTS runtime_state text
|
||||||
|
CHECK (runtime_state IS NULL OR runtime_state IN ('scheduled', 'paused', 'completed', 'error')),
|
||||||
|
ADD COLUMN IF NOT EXISTS runtime_last_status text
|
||||||
|
CHECK (runtime_last_status IS NULL OR runtime_last_status IN ('ok', 'error')),
|
||||||
|
ADD COLUMN IF NOT EXISTS runtime_last_error text,
|
||||||
|
ADD COLUMN IF NOT EXISTS runtime_last_delivery_error text,
|
||||||
|
ADD COLUMN IF NOT EXISTS runtime_synced_at timestamptz;
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_scheduled_jobs_agent_runtime_synced_at
|
||||||
|
ON public.scheduled_jobs (agent_instance_id, runtime_synced_at DESC NULLS LAST);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue