Commit 5708241b authored by Nick Thomas's avatar Nick Thomas 💃

Merge branch '4852-migration-specs-fail-locally-if-no-geo-db-is-configured' into 'master'

Make resetting column information overridable in EE

See merge request !17007
parents f69d6a74 77c1d87f
Pipeline #17278191 failed with stages
in 38 minutes and 49 seconds
......@@ -25,14 +25,19 @@ module MigrationsHelpers
# Reset column information for the most offending classes **after** we
# migrated the schema up, otherwise, column information could be outdated
ActiveRecord::Base.descendants.each { |klass| klass.reset_column_information }
# migrated the schema up, otherwise, column information could be
# outdated. We have a separate method for this so we can override it in EE.
# Without that, we get errors because of missing attributes, e.g.
# super: no superclass method `elasticsearch_indexing' for #<ApplicationSetting:0x00007f85628508d8>
def reset_column_information(klass)
def previous_migration
migrations.each_cons(2) do |previous, migration|
break previous if ==
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment