CREATE TABLE failed_reward_jobs (
    id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    reward_job_id BIGINT,
    reason VARCHAR(1024),
    payload VARCHAR(2000),
    failed_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX idx_failed_reward_jobs_job ON failed_reward_jobs(reward_job_id);
