Remove extra establish connection in pending migrations
`purge` always re-establishes the connection at the end so we _should_ always have a connection and shouldn't need to re-establish.
This commit is contained in:
parent
86cc3a0592
commit
e7db645821
@ -638,7 +638,6 @@ def check_pending!(connection = Base.connection)
|
||||
end
|
||||
|
||||
def load_schema_if_pending!
|
||||
current_db_config = Base.connection_db_config
|
||||
all_configs = db_configs_in_current_env
|
||||
|
||||
needs_update = !all_configs.all? do |db_config|
|
||||
@ -654,9 +653,6 @@ def load_schema_if_pending!
|
||||
end
|
||||
end
|
||||
|
||||
# Establish a new connection, the old database may be gone (db:test:prepare uses purge)
|
||||
Base.establish_connection(current_db_config)
|
||||
|
||||
check_pending_migrations(db_configs: all_configs)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user