rails-push-notifications icon indicating copy to clipboard operation
rails-push-notifications copied to clipboard

Migration files in Rails 5 wont migrate

Open akatriel opened this issue 7 years ago • 1 comments

rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

  class CreateRailsPushNotificationsApps < ActiveRecord::Migration[4.2]
C:/Users/micha/Documents/WebDev/sms/db/migrate/20180611231832_create_rails_push_notifications_apps.rb:1:in `<top (required)>'

Caused by:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

  class CreateRailsPushNotificationsApps < ActiveRecord::Migration[4.2]
C:/Users/micha/Documents/WebDev/sms/db/migrate/20180611231832_create_rails_push_notifications_apps.rb:1:in `<top (required)>'
Tasks: TOP => db:migrate

The fix is to specify the version in the inheritance signature: class CreateRailsPushNotificationsApps < ActiveRecord::Migration[5.0] and class CreateRailsPushNotificationsNotifications < ActiveRecord::Migration[5.0]

akatriel avatar Jun 11 '18 23:06 akatriel

Thanks @akatriel for your finding!! Would you be up for a PR? Looks like you already have the fix!!

Thanks again!

calonso avatar Jun 12 '18 08:06 calonso