aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2017-08-31 15:42:13 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2017-09-01 12:32:26 +0000
commitacaff3b3bfe4918e00920fb14c9f4240d00dcb21 (patch)
tree6da73a7ac96725e69c309a4c48ec01e5643e971a /activerecord
parent827308d86a43c2743919693eae34f8dd7f11a291 (diff)
downloadrails-acaff3b3bfe4918e00920fb14c9f4240d00dcb21.tar.gz
rails-acaff3b3bfe4918e00920fb14c9f4240d00dcb21.tar.bz2
rails-acaff3b3bfe4918e00920fb14c9f4240d00dcb21.zip
Skip `test_remove_column_with_multi_column_index`
when tested with MariaDB 10.2.8 or higher Refer #30485 https://mariadb.com/kb/en/the-mariadb-library/alter-table/#drop-column-if-exists-col_name-cascaderestrict > MariaDB starting with 10.2.8 > Dropping a column that is part of a multi-column UNIQUE constraint is not permitted.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/migration/columns_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb
index 1b1d0af132..8ca20b6172 100644
--- a/activerecord/test/cases/migration/columns_test.rb
+++ b/activerecord/test/cases/migration/columns_test.rb
@@ -142,6 +142,10 @@ module ActiveRecord
end
def test_remove_column_with_multi_column_index
+ # MariaDB starting with 10.2.8
+ # Dropping a column that is part of a multi-column UNIQUE constraint is not permitted.
+ skip if current_adapter?(:Mysql2Adapter) && connection.mariadb? && connection.version >= "10.2.8"
+
add_column "test_models", :hat_size, :integer
add_column "test_models", :hat_style, :string, limit: 100
add_index "test_models", ["hat_style", "hat_size"], unique: true