aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/mysql2_specific_schema.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-01-16 04:18:21 -0200
committerRafael França <rafaelmfranca@gmail.com>2016-01-16 04:18:21 -0200
commitde2259791cd21e80d44ec7c7562324c73ff85699 (patch)
tree06769112a75a6e063147575d4b3e3f29cf3e9753 /activerecord/test/schema/mysql2_specific_schema.rb
parentcff9cd9fe754ed8d8b7d6656f5d3a5a26f00f216 (diff)
parent744552f72d49c222d6cc42ab8bad9a16a812377a (diff)
downloadrails-de2259791cd21e80d44ec7c7562324c73ff85699.tar.gz
rails-de2259791cd21e80d44ec7c7562324c73ff85699.tar.bz2
rails-de2259791cd21e80d44ec7c7562324c73ff85699.zip
Merge pull request #20005 from kamipo/default_expression_support
Add `:expression` option support on the schema default
Diffstat (limited to 'activerecord/test/schema/mysql2_specific_schema.rb')
-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