aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-02-18 10:45:12 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-02-18 10:45:12 -0200
commitb5ce18608edf0e55bc8a0d7d62ca703c75c7c4ef (patch)
tree088c2aa4fac0979343886ad08c9bee278a6933fd /activerecord/test/cases/adapters/mysql2
parent9814eb64275973abc66b1481b522c39b7083fff5 (diff)
parentaf64c82411067776d6e649462d9b74b14f1083f3 (diff)
downloadrails-b5ce18608edf0e55bc8a0d7d62ca703c75c7c4ef.tar.gz
rails-b5ce18608edf0e55bc8a0d7d62ca703c75c7c4ef.tar.bz2
rails-b5ce18608edf0e55bc8a0d7d62ca703c75c7c4ef.zip
Merge pull request #18987 from kamipo/prefer_drop_table_if_exists_true_over_raw_sql
Prefer `drop_table if_exists: true` over raw SQL
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-rw-r--r--activerecord/test/cases/adapters/mysql2/reserved_word_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/reserved_word_test.rb b/activerecord/test/cases/adapters/mysql2/reserved_word_test.rb
index 7f97b454bb..beb829fc46 100644
--- a/activerecord/test/cases/adapters/mysql2/reserved_word_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/reserved_word_test.rb
@@ -138,7 +138,7 @@ class MysqlReservedWordTest < ActiveRecord::TestCase
# custom drop table, uses execute on connection to drop a table if it exists. note: escapes table_name
def drop_tables_directly(table_names, connection = @connection)
table_names.each do |name|
- connection.execute("DROP TABLE IF EXISTS `#{name}`")
+ connection.drop_table name, if_exists: true
end
end