Skip to content

Commit

Permalink
Add index to AR spec setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Apr 3, 2010
1 parent 39bfbe8 commit aff5cd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/setup/active_record.rb
Expand Up @@ -5,23 +5,23 @@
ActiveRecord::Migration.verbose = false

ActiveRecord::Schema.define do

create_table :delayed_jobs, :force => true do |table|
table.integer :priority, :default => 0
table.integer :attempts, :default => 0
table.text :handler
table.string :last_error
table.text :last_error
table.datetime :run_at
table.datetime :locked_at
table.string :locked_by
table.datetime :failed_at
table.string :locked_by
table.timestamps
end

add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'

create_table :stories, :force => true do |table|
table.string :text
end

end

# Purely useful for test cases...
Expand Down

0 comments on commit aff5cd5

Please sign in to comment.