joshmn / caffeinate

A Rails engine for drip campaigns/scheduled sequences and periodical support. Works with ActionMailer, and other things.
https://caffeinate.email
MIT License
345 stars 13 forks source link

Error running migrations #4

Closed chrisedington closed 3 years ago

chrisedington commented 3 years ago

Hi,

Running into an issue running the migrations on Rails 5.0.4.

Ran the generator, which showed a line I haven't seen before, wasn't sure if it had consequences:

Running via Spring preloader in process 19482
      create  config/initializers/caffeinate.rb
      create  app/drippers/application_dripper.rb
**File unchanged! The supplied flag value not found!  config/routes.rb**
Copied migration 20210105060001_create_caffeinate_campaigns.caffeinate.rb from caffeinate
Copied migration 20210105060002_create_caffeinate_campaign_subscriptions.caffeinate.rb from caffeinate
Copied migration 20210105060003_create_caffeinate_mailings.caffeinate.rb from caffeinate

Then I ran a rake db:migrate and got the following errors:

rails aborted!
ArgumentError: Unknown migration version "6.0"; expected one of "4.2", "5.0"

Seems the migrations set to Rails 6 only?

joshmn commented 3 years ago

hey Chris! Sorry for the delayed reply. I didn't see this in my notifications.

I haven't added a version check yet for migrations. Changing the versions on the migrations should work. I'll get a PR up shortly to address this.

joshmn commented 3 years ago

Should be fixed in 0.14 :)