Skip to content

Instantly share code, notes, and snippets.

@marcioj
Created May 26, 2016 13:58
Show Gist options
  • Save marcioj/980199464713956ce010b5437bb3da24 to your computer and use it in GitHub Desktop.
Save marcioj/980199464713956ce010b5437bb3da24 to your computer and use it in GitHub Desktop.
Ignore migrations with errors
class ActiveRecord::Migration
def exec_migration_with_ignore_errors(conn, direction)
begin
exec_migration_without_ignore_errors(conn, direction)
rescue => e
puts "Ignoring #{e}"
end
end
alias_method_chain :exec_migration, :ignore_errors
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment