outrigger icon indicating copy to clipboard operation
outrigger copied to clipboard

Support broken migrations filtering

Open pocheptsov opened this issue 6 years ago • 0 comments

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?

pocheptsov avatar Jan 09 '20 14:01 pocheptsov