1 class AddStateToJob < ActiveRecord::Migration
3 if !column_exists?(:jobs, :state)
4 add_column :jobs, :state, :string
7 Job.reset_column_information
11 # before_save filter will set state based on job status
18 if column_exists?(:jobs, :state)
19 remove_column :jobs, :state