File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -715,13 +715,7 @@ def check_all_pending!
715
715
716
716
def load_schema_if_pending!
717
717
if any_schema_needs_update?
718
- # Roundtrip to Rake to allow plugins to hook into database initialization.
719
- root = defined? ( ENGINE_ROOT ) ? ENGINE_ROOT : Rails . root
720
-
721
- FileUtils . cd ( root ) do
722
- Base . connection_handler . clear_all_connections! ( :all )
723
- system ( "bin/rails db:test:prepare" )
724
- end
718
+ load_schema!
725
719
end
726
720
727
721
check_pending_migrations
@@ -785,6 +779,16 @@ def pending_migrations
785
779
def env
786
780
ActiveRecord ::ConnectionHandling ::DEFAULT_ENV . call
787
781
end
782
+
783
+ def load_schema!
784
+ # Roundtrip to Rake to allow plugins to hook into database initialization.
785
+ root = defined? ( ENGINE_ROOT ) ? ENGINE_ROOT : Rails . root
786
+
787
+ FileUtils . cd ( root ) do
788
+ Base . connection_handler . clear_all_connections! ( :all )
789
+ system ( "bin/rails db:test:prepare" )
790
+ end
791
+ end
788
792
end
789
793
790
794
def disable_ddl_transaction # :nodoc:
You can’t perform that action at this time.
0 commit comments