Sha256: 5512f409bfb7616af12fe41858d41f57cfcee20a229dea1d888e6733b17c6830
Contents?: true
Size: 482 Bytes
Versions: 4
Compression:
Stored size: 482 Bytes
Contents
# Creates DATETIME(6) column types by default which support microseconds. # # Without it, only regular (second precise) DATETIME columns are created. module ActiveRecord::ConnectionAdapters if ActiveRecord::Base.connection.instance_of? Mysql2Adapter version = Gem::Version.new(Mysql2::Client.info.fetch(:version)) min_vresion = Gem::Version.new('5.6.4') if version>=min_vresion AbstractMysqlAdapter::NATIVE_DATABASE_TYPES[:datetime][:limit] = 6 end end end
Version data entries
4 entries across 4 versions & 1 rubygems