Giter Site home page Giter Site logo

Comments (5)

markrebec avatar markrebec commented on May 19, 2024

Any chance your migration failed in a way that it did not roll itself back? Take a look at your db schema and version to see if part of the migration was run but not rolled back on failure. You might also want to try running db:rollback then db:migrate again.

from commands.

amalagaura avatar amalagaura commented on May 19, 2024

It was completely rolled back. I am using postgres which does the rollback, in addition it was a single line.

Running rake db:migrate from the command line lets it run. I thought this may be a known issue.

from commands.

markrebec avatar markrebec commented on May 19, 2024

Thought I'd make sure to eliminate the obvious :) Sounds like it's definitely a bug, though, and sounds like your assumption is correct that the migration file was not reloaded (I also don't think reload! would reload migrations either, but I'm not sure). Do you know if quitting and re-launching the console, then running the migration works (I'd assume yes, since everything is reloaded)? That of course is not a solution, but might help prove the source of the issue.

from commands.

amalagaura avatar amalagaura commented on May 19, 2024

Running the migration after relaunching console does work.

I looked through the code and this bug makes sense since this gem does not deal with the reload! command.

from commands.

markrebec avatar markrebec commented on May 19, 2024

I wonder if it's worth adding a new reload command that would wrap the rails built-in reload! and reload migrations, tests (since I don't think they're reloaded by reload! either), etc. Might be possible to even just use alias_method_chain...?

I think, though, that tests might already be handled by commands and be reloaded automatically, but I'm not sure. If that is the case, maybe migrations (and anything else we come across) can be reloaded at the same time?

from commands.

Related Issues (15)

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.