Skip to content

Commit 72e7f03

Browse files
committed
[test] on MariaDB 10.2+ we're allowed to change default
... we previously only tested against MariaDB 10.0/10.1
1 parent 438a003 commit 72e7f03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/db/mysql/change_column_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class MySQLChangeColumnTest < Test::Unit::TestCase
1313
ActiveRecord::Migration.add_column :people, :about, :string, :default => 'x'
1414
# NOTE: even in non strict mode MySQL does not allow us add or change
1515
# text/binary with a default ...
16-
if ar_version('4.2')
16+
if mariadb_server? && ActiveRecord::Base.connection.database_version >= '10.2'
17+
ActiveRecord::Migration.change_column :people, :about, :text
18+
else
1719
assert_raises ActiveRecord::StatementInvalid do
1820
ActiveRecord::Migration.change_column :people, :about, :text
1921
end
20-
else
21-
ActiveRecord::Migration.change_column :people, :about, :text
2222
end
2323
ActiveRecord::Migration.add_column :people, :photo, :binary
2424
end

0 commit comments

Comments
 (0)