Skip to content

Generated migration doesn't work in Rails 5 #6

Description

@teeeps
== 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions