ALTER TABLE post_export_jobs
  ADD COLUMN IF NOT EXISTS processed_count INTEGER NOT NULL DEFAULT 0;

ALTER TABLE post_export_jobs
  ADD COLUMN IF NOT EXISTS current_part_index INTEGER;

ALTER TABLE post_export_jobs
  ADD COLUMN IF NOT EXISTS progress_message TEXT NOT NULL DEFAULT '';

ALTER TABLE post_export_jobs
  ADD COLUMN IF NOT EXISTS started_at TIMESTAMPTZ;

ALTER TABLE post_export_jobs
  ADD CONSTRAINT post_export_jobs_processed_count_check
  CHECK (processed_count >= 0);
