-- Add version field for optimistic locking to prevent race conditions
-- This allows safe concurrent updates to runner job status

ALTER TABLE "runner_jobs" ADD COLUMN "version" INTEGER NOT NULL DEFAULT 1;

-- Create index for better performance on version checks
CREATE INDEX "runner_jobs_version_idx" ON "runner_jobs"("version");
