Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration files in Rails 5 wont migrate #22

Open
akatriel opened this issue Jun 11, 2018 · 1 comment · May be fixed by #23
Open

Migration files in Rails 5 wont migrate #22

akatriel opened this issue Jun 11, 2018 · 1 comment · May be fixed by #23

Comments

@akatriel
Copy link

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
Copy link
Owner

calonso commented Jun 12, 2018

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

Thanks again!

lfuelling added a commit to lfuelling/rails-push-notifications that referenced this issue Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants