diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-03-02 17:35:05 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-02 17:43:01 +0100 |
commit | 3f4964299acd1351a519293991b97dd78b775073 (patch) | |
tree | bc9312a08fae97e2b9d810c9d34653ffd0a62c15 /activerecord/test/schema/mysql2_specific_schema.rb | |
parent | e20dc1b313303540b44effd94fbc8cf39121ad28 (diff) | |
download | rails-3f4964299acd1351a519293991b97dd78b775073.tar.gz rails-3f4964299acd1351a519293991b97dd78b775073.tar.bz2 rails-3f4964299acd1351a519293991b97dd78b775073.zip |
tests, favor `drop_table` and `:if_exists` over raw SQL.
We've replaced most querues using DROP TABLE in our tests already.
This patch replaces the last couple calls.
Diffstat (limited to 'activerecord/test/schema/mysql2_specific_schema.rb')
-rw-r--r-- | activerecord/test/schema/mysql2_specific_schema.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb index a9a6514c9d..d6fd0c4ab0 100644 --- a/activerecord/test/schema/mysql2_specific_schema.rb +++ b/activerecord/test/schema/mysql2_specific_schema.rb @@ -35,9 +35,7 @@ BEGIN END SQL - ActiveRecord::Base.connection.execute <<-SQL -DROP TABLE IF EXISTS collation_tests; -SQL + ActiveRecord::Base.connection.drop_table "collation_tests", if_exists: true ActiveRecord::Base.connection.execute <<-SQL CREATE TABLE collation_tests ( @@ -46,9 +44,7 @@ CREATE TABLE collation_tests ( ) CHARACTER SET utf8 COLLATE utf8_general_ci SQL - ActiveRecord::Base.connection.execute <<-SQL -DROP TABLE IF EXISTS enum_tests; -SQL + ActiveRecord::Base.connection.drop_table "enum_tests", if_exists: true ActiveRecord::Base.connection.execute <<-SQL CREATE TABLE enum_tests ( |