Schema: make job_tag index unique
Schema: add state_prev column to job table
Schema: rename job column to job_id

In tables with a job column which references job.id, this column
has been renamed to job_id.