From 0be7f45ae6ec6baa6b21cd9f59963e3422b6d070 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 29 Apr 2018 16:28:11 +0900 Subject: Restore original merging order to enforce `if_exists: true` The merging order was accidentally changed at #32447. The original intention is force `drop_table ... if_exists: true`. #28070. --- .../active_record/connection_adapters/abstract/schema_statements.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index ac73337aef..54dc917e99 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -305,8 +305,7 @@ module ActiveRecord yield td if block_given? if options[:force] - drop_opts = { if_exists: true }.merge(**options) - drop_table(table_name, drop_opts) + drop_table(table_name, options.merge(if_exists: true)) end result = execute schema_creation.accept td -- cgit v1.2.3