Permalink
Browse files

Support mysql2 0.4.x and 0.5.x

  • Loading branch information...
sodabrew committed Mar 21, 2018
1 parent fab6ded commit 9f5477af93d18e9644903f89bce4ffde13cc376e
@@ -3,7 +3,7 @@
require "active_record/connection_adapters/abstract_mysql_adapter"
require "active_record/connection_adapters/mysql/database_statements"
gem "mysql2", "~> 0.4.4"
gem "mysql2", ">= 0.4.4", "< 0.6.0"
require "mysql2"
module ActiveRecord
@@ -299,7 +299,7 @@ def rails_version_specifier(gem_version = Rails.gem_version)
def gem_for_database
# %w( mysql postgresql sqlite3 oracle frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql )
case options[:database]
when "mysql" then ["mysql2", ["~> 0.4.4"]]
when "mysql" then ["mysql2", [">= 0.4.4", "< 0.6.0"]]
when "postgresql" then ["pg", [">= 0.18", "< 2.0"]]
when "oracle" then ["activerecord-oracle_enhanced-adapter", nil]
when "frontbase" then ["ruby-frontbase", nil]

0 comments on commit 9f5477a

Please sign in to comment.