GithubHelp home page GithubHelp logo

Comments (2)

LXAfterDark avatar LXAfterDark commented on August 16, 2024 2

I ran into this exact same problem not moments ago. Did a little digging and here's what I found.

At first glance it appears that the DeviseCreateUserConstraintsAndIndexes migration is not being created correctly. I took a gamble and changed the migration created by devise-neo4j from this:

class DeviseCreateUserConstraintsAndIndexes < Neo4j::Migrations::Base
  def change
    add_index :User, :email, force: true
    add_index :User, :remember_token, force: true
    add_index :User, :reset_password_token, force: true
    # add_index :User, :confirmation_token, force: true
    # add_index :User, :unlock_token, force: true
    # add_index :User, :authentication_token, force: true
  end
end

to this:

class DeviseCreateUserConstraintsAndIndexes < Neo4j::Migrations::Base
  def up
    add_index :User, :email, force: true
    add_index :User, :remember_token, force: true
    add_index :User, :reset_password_token, force: true
    # add_index :User, :confirmation_token, force: true
    # add_index :User, :unlock_token, force: true
    # add_index :User, :authentication_token, force: true
  end

  def down
    # drop_index :User, :authentication_token, force: true
    # drop_index :User, :unlock_token, force: true
    # drop_index :User, :confirmation_token, force: true
    drop_index :User, :reset_password_token, force: true
    drop_index :User, :remember_token, force: true
    drop_index :User, :email, force: true
  end
end

and the migration completed successfully once I reset and re-ran it. Unfortunately since I'm relatively new to Rails (or Ruby for that matter), I can't tell you why this worked. My best guess (read: pure speculation) is that the NotImplementedError is indicative of Rails not expecting to see def change in the migration.

EDITED TO CLARIFY: I ran into the same problem with both migrations getting the same timestamp as well -- everything I outlined above was what I did to get the second migration to work after changing the timestamp on the second migration as outlined in @leehericks' post above. So, best as I can tell, there's two problems that need to be solved for... the overlapping timestamps and the content of the second migration file.

from devise-activegraph.

cheerfulstoic avatar cheerfulstoic commented on August 16, 2024

Hey @TheOneTrueLX thanks for this!

I think with your issue the problem is that the change method isn't supported by the neo4j gem's migrations. Probably it could be supported at some point.

I just created an issue in the neo4j gem repo to track this idea

from devise-activegraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.