CREATE TABLE failed_reward_jobs (
    id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    reward_job_id BIGINT,
    reason VARCHAR(1024),
    payload JSONB,
    failed_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);

CREATE INDEX idx_failed_reward_jobs_job ON failed_reward_jobs(reward_job_id);

