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

Support broken migrations filtering #9

Open
pocheptsov opened this issue Jan 9, 2020 · 0 comments · May be fixed by #10
Open

Support broken migrations filtering #9

pocheptsov opened this issue Jan 9, 2020 · 0 comments · May be fixed by #10

Comments

@pocheptsov
Copy link

In matured applications, often happening that already applied legacy migrations are syntactically broken e.g.:

# frozen_string_literal: true

class LegacyBrokenMigration < ActiveRecord::Migration[5.0]
  tag :broken

  # NameError: uninitialized constant LegacyBrokenMigration::BreakableChange
  BreakableChange.run

  def change; end
end

Implementation of the Rails migration load the list of all migrations and passing them to the filter regardless if they were already applied. Ideally, Outrigger.filter should be called on pending migrations only but that's difficult to achieve with the current Rails code.

Thoughts?

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

Successfully merging a pull request may close this issue.

1 participant