Skip to content

The only tool you need to know what is happening and how to fix it.

750 B
Raw Blame
CREATE TABLE IF NOT EXISTS synthetic_checks (
    id SERIAL PRIMARY KEY,
    project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
    name VARCHAR(200) NOT NULL,
    check_type VARCHAR(20) NOT NULL,
    enabled BOOLEAN NOT NULL DEFAULT TRUE,
    interval_seconds INT NOT NULL DEFAULT 60,
    timeout_seconds INT NOT NULL DEFAULT 30,
    config JSONB NOT NULL DEFAULT '{}',
    failure_threshold INT NOT NULL DEFAULT 2,
    current_status VARCHAR(10) NOT NULL DEFAULT 'unknown',
    consecutive_failures INT NOT NULL DEFAULT 0,
    last_run_at TIMESTAMPTZ,
    last_state_change_at TIMESTAMPTZ,
    next_run_at TIMESTAMPTZ NOT NULL,
    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
)