2012-06-16 19:27:46 +01:00
|
|
|
class DropDelayedJobs < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
drop_table :delayed_jobs
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
create_table :delayed_jobs do |t|
|
2014-01-21 04:51:49 +00:00
|
|
|
t.integer "priority", default: 0
|
|
|
|
t.integer "attempts", default: 0
|
2012-06-16 19:27:46 +01:00
|
|
|
t.text "handler"
|
|
|
|
t.text "last_error"
|
|
|
|
t.datetime "run_at"
|
|
|
|
t.datetime "locked_at"
|
|
|
|
t.datetime "failed_at"
|
|
|
|
t.string "locked_by"
|
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
2014-01-21 04:51:49 +00:00
|
|
|
t.string "queue", default: "default"
|
2012-06-16 19:27:46 +01:00
|
|
|
end
|
2014-01-21 04:51:49 +00:00
|
|
|
add_index :delayed_jobs, ["priority", "run_at"], name: "delayed_jobs_priority"
|
2012-06-16 19:27:46 +01:00
|
|
|
end
|
|
|
|
end
|