1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Include running mariadb on travis

- Specify we want to run on latest stable ruby for mariadb

- change in runs of builds

Make mariadb? method publicly available
This commit is contained in:
Vipul A M 2016-04-12 19:19:21 +05:30
parent db9bc80973
commit bbb8f518b5
3 changed files with 10 additions and 4 deletions

View file

@ -31,6 +31,11 @@ rvm:
matrix:
include:
# Latest compiled version in http://rubies.travis-ci.org
- rvm: 2.3.0
env:
- "GEM=ar:mysql2"
addons:
mariadb: 10.0
- rvm: jruby-9.0.5.0
jdk: oraclejdk8
env:

View file

@ -81,6 +81,10 @@ module ActiveRecord
@version ||= Version.new(full_version.match(/^\d+\.\d+\.\d+/)[0])
end
def mariadb? # :nodoc:
full_version =~ /mariadb/i
end
# Returns true, since this connection adapter supports migrations.
def supports_migrations?
true
@ -782,10 +786,6 @@ module ActiveRecord
subselect.from subsubselect.as('__active_record_temp')
end
def mariadb?
full_version =~ /mariadb/i
end
def supports_rename_index?
mariadb? ? false : version >= '5.7.6'
end

View file

@ -44,6 +44,7 @@ class TimePrecisionTest < ActiveRecord::TestCase
end
def test_formatting_time_according_to_precision
skip("TIME column on MariaDB doesn't ignore the date part of the string when it coerces to time") if current_adapter?(:Mysql2Adapter) && ActiveRecord::Base.connection.mariadb?
@connection.create_table(:foos, force: true) do |t|
t.time :start, precision: 0
t.time :finish, precision: 4