aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2015-05-04 19:01:24 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-01-13 22:03:56 +0900
commit744552f72d49c222d6cc42ab8bad9a16a812377a (patch)
tree3aa27a4d156a9c6a899987d00b62a55eab380281 /activerecord/test/schema
parent4b1188b5abc66a42980e7708f78a54177b31c300 (diff)
downloadrails-744552f72d49c222d6cc42ab8bad9a16a812377a.tar.gz
rails-744552f72d49c222d6cc42ab8bad9a16a812377a.tar.bz2
rails-744552f72d49c222d6cc42ab8bad9a16a812377a.zip
Fix extract default with CURRENT_TIMESTUMP
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/mysql2_specific_schema.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb
index 752572a79c..701e6f45b3 100644
--- a/activerecord/test/schema/mysql2_specific_schema.rb
+++ b/activerecord/test/schema/mysql2_specific_schema.rb
@@ -1,4 +1,11 @@
ActiveRecord::Schema.define do
+
+ if ActiveRecord::Base.connection.version >= '5.6.0'
+ create_table :datetime_defaults, force: true do |t|
+ t.datetime :modified_datetime, default: -> { 'CURRENT_TIMESTAMP' }
+ end
+ end
+
create_table :binary_fields, force: true do |t|
t.binary :var_binary, limit: 255
t.binary :var_binary_large, limit: 4095