samedi 20 décembre 2014

Rails engine fails Travis continuous integration with migration error

I have a Rails engine which fails Travis continuous integration with the following error:



Multiple migrations have the name CreatePaymillOnRailsPlans


When installed, the engine works fine and migration scripts are not duplicated:



$ ls -l db/migrate/
total 8
-rw-rw-r-- 1 lsoave lsoave 228 dic 20 19:01 20131111122533_create_paymill_on_rails_plans.rb
-rw-rw-r-- 1 lsoave lsoave 272 dic 20 19:01 20131111132308_create_paymill_on_rails_subscriptions.rb

$ cat db/migrate/*.rb
class CreatePaymillOnRailsPlans < ActiveRecord::Migration
def change
create_table :paymill_on_rails_plans do |t|

t.string :name
t.string :price
t.string :paymill_id

t.timestamps
end
end
end
class CreatePaymillOnRailsSubscriptions < ActiveRecord::Migration
def change
create_table :paymill_on_rails_subscriptions do |t|

t.string :name
t.string :email
t.integer :plan_id
t.string :paymill_id

t.timestamps
end
end
end


How can I get rid of it and still mainteining the db migration test?


Follow the .travis.yml file:



lsoave@basenode:~/Github/paymill_on_rails$ cat .travis.yml
language: ruby
bundler_args: --without development
rvm:
- 1.9.2
- 1.9.3
- 2.0.0
- 2.1.0
- 2.1.1
- 2.1.2
- 2.1.3
- 2.1.4
- 2.1.5
env:
- DB=sqlite
- DB=mysql
- DB=postgresql
script:
- RAILS_ENV=test bundle exec rake paymill_on_rails:db:migrate --trace
- bundle exec rspec spec/
before_script:
- mysql -e 'create database my_app_test'
- psql -c 'create database my_app_test' -U postgres
bundler_args: --binstubs=./bundler_stubs
services:

Aucun commentaire:

Enregistrer un commentaire