Code Monkey home page Code Monkey logo

Comments (9)

ankane avatar ankane commented on June 25, 2024 1

Migrations inherit from ActiveRecord::Schema, which can run operations without methods. Anyways, I updated the code to be more robust to this scenario.

from strong_migrations.

ankane avatar ankane commented on June 25, 2024

Hey @ziaulrehman40, Strong Migrations is tested against Rails 5.1 (https://travis-ci.org/ankane/strong_migrations), so think something else in your app may be interfering with it.

from strong_migrations.

ankane avatar ankane commented on June 25, 2024

@checker should be set on initialization, but maybe another gem is overriding it?

@checker = StrongMigrations::Checker.new(self)

from strong_migrations.

ziaulrehman40 avatar ziaulrehman40 commented on June 25, 2024

It was working fine on 4.2 and 5.0, i can check what else ot updated while migrating on 5.1.

Though nothing really stands out, but I updated haml-rails, pg and added listen gem.

Nothing else i can in my changelog. I can try reverting these gem updates/additions if that helps.

from strong_migrations.

ziaulrehman40 avatar ziaulrehman40 commented on June 25, 2024

No, didn't help. I undid all gemfile changes and still same.

from strong_migrations.

ankane avatar ankane commented on June 25, 2024

The error doesn't occur in the test suite or a fresh Rails 5.1 app, so all signs point to something in your app.

from strong_migrations.

ziaulrehman40 avatar ziaulrehman40 commented on June 25, 2024

Yeah i understand that, but we must hunt it down whatever it is.
I will try to spend some time on this and as soon as I find something i will report.

Just to add,

  1. StrongMigrations.start_after is set, and there are a few migrations that run just fine after this set timestamp value, and this specific one fails which is near end of the list(second last).

  2. If i comment this specific migration's actual migration stuff, it passes over it just fine.

from strong_migrations.

ziaulrehman40 avatar ziaulrehman40 commented on June 25, 2024

Oh found it...

If you look closely, you can see there is no def change or def up in the migration i have pasted above, that was the issue. wrapping migration in a def change fixed it.

I am not sure how it was even working in older versions... this is confusing.

from strong_migrations.

ziaulrehman40 avatar ziaulrehman40 commented on June 25, 2024

Thankyou @ankane , this approach was what came to my mind when i was investigating, but you were super fast to push a commit. 👍

from strong_migrations.

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.