calonso / rails-push-notifications

Rails iOS, Android and Windows Phone Push Notifications made easy!!
https://rubygems.org/gems/rails-push-notifications
MIT License
139 stars 42 forks source link

Migration files in Rails 5 wont migrate #22

Open akatriel opened 6 years ago

akatriel commented 6 years ago
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]

calonso commented 6 years ago

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

Thanks again!