Skip to content

Commit

Permalink
Use the migration to setup the test database
Browse files Browse the repository at this point in the history
  • Loading branch information
albus522 committed Sep 25, 2014
1 parent 536a5c3 commit a53e3cc
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,9 @@
ActiveRecord::Base.logger = Delayed::Worker.logger
ActiveRecord::Migration.verbose = false

require 'generators/delayed_job/templates/migration'
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.text :last_error
table.datetime :run_at
table.datetime :locked_at
table.datetime :failed_at
table.string :locked_by
table.string :queue
table.timestamps
end

add_index :delayed_jobs, [:priority, :run_at], name: "delayed_jobs_priority"
CreateDelayedJobs.up

create_table :stories, primary_key: :story_id, force: true do |table|
table.string :text
Expand Down

0 comments on commit a53e3cc

Please sign in to comment.