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

Generated migration doesn't work in Rails 5 #6

Open
mrfidgety opened this issue Nov 8, 2017 · 0 comments
Open

Generated migration doesn't work in Rails 5 #6

mrfidgety opened this issue Nov 8, 2017 · 0 comments

Comments

@mrfidgety
Copy link

== 20171106025207 CreateSessions: migrating ===================================
-- create_table(:sessions, {:id=>:uuid})
   -> 0.0443s
-- add_index(:sessions, :authentication_token)
   -> 0.0066s
== 20171106025207 CreateSessions: migrated (0.0511s) ==========================

rails 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 DeviseSessionableCreateSessions < ActiveRecord::Migration[4.2]
/Users/tristanhart/workspace/ohai-rails/db/migrate/20171108062236_devise_sessionable_create_sessions.rb:1:in `<top (required)>'
/Users/tristanhart/workspace/ohai-rails/bin/rails:9:in `require'
/Users/tristanhart/workspace/ohai-rails/bin/rails:9:in `<top (required)>'
/Users/tristanhart/workspace/ohai-rails/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'

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

  class DeviseSessionableCreateSessions < ActiveRecord::Migration[4.2]
/Users/tristanhart/workspace/ohai-rails/db/migrate/20171108062236_devise_sessionable_create_sessions.rb:1:in `<top (required)>'
/Users/tristanhart/workspace/ohai-rails/bin/rails:9:in `require'
/Users/tristanhart/workspace/ohai-rails/bin/rails:9:in `<top (required)>'
/Users/tristanhart/workspace/ohai-rails/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
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

No branches or pull requests

1 participant