Class: CreateJobs
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateJobs
- Defined in:
- lib/jobs/migrate.rb
Class Method Summary collapse
Class Method Details
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/jobs/migrate.rb', line 2 def self.up create_table :jobs, :force => true do |t| t.string :name, :null => false t.text :data t.string :status t.datetime :created_at t.datetime :updated_at t.integer :duration t.integer :taskable_id t.string :taskable_type t.text :details t.boolean :locked, :default => false, :null => false t.integer :attempts, :default => 0, :null => false end add_index :jobs, [:status, :locked] end |