1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

Dont add column if already exists

This commit is contained in:
KiranMahale 2018-11-15 12:32:51 +05:30 committed by Anil Kumar Maurya
parent 7443311fb4
commit 4b7f22611f
2 changed files with 3 additions and 2 deletions

View file

@ -22,6 +22,7 @@ ActiveRecord::Migration.suppress_messages do
ActiveRecord::Migration.create_table "jobs", :force => true do |t|
t.string "state"
t.string "status"
end
%w(validators multiple_validators workers invalid_persistors multiple_invalid_persistors silent_persistors multiple_silent_persistors).each do |table_name|

View file

@ -46,8 +46,8 @@ if defined?(ActiveRecord)
it "dont add column if column is already exists" do
require 'models/active_record/job.rb'
load_schema
run_generator %w(job state)
assert_no_migration "db/migrate/add_state_to_jobs.rb"
run_generator %w(job status)
assert_no_migration "db/migrate/add_status_to_jobs.rb"
end
end
end