diff options
author | kenjiszk <kenji.suzuki.1984@gmail.com> | 2016-05-21 13:32:28 +0000 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-09-01 22:09:01 -0400 |
commit | 15e04b4ef8726198472382204196cad713aac364 (patch) | |
tree | 7da27742a64744ba413c9ad35a26792f8c4e0d54 /activerecord/test/schema | |
parent | d8ac08f6bf545c025d7540fb680f41233bcca566 (diff) | |
download | rails-15e04b4ef8726198472382204196cad713aac364.tar.gz rails-15e04b4ef8726198472382204196cad713aac364.tar.bz2 rails-15e04b4ef8726198472382204196cad713aac364.zip |
add mysql and sqlite3 default test
[Gannon McGibbon + Kenji Suzuki]
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/mysql2_specific_schema.rb | 7 | ||||
-rw-r--r-- | activerecord/test/schema/sqlite_specific_schema.rb | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb index 8371ba9528..0f2f6ddd68 100644 --- a/activerecord/test/schema/mysql2_specific_schema.rb +++ b/activerecord/test/schema/mysql2_specific_schema.rb @@ -14,6 +14,13 @@ ActiveRecord::Schema.define do end end + create_table :defaults, force: true do |t| + t.date :fixed_date, default: "2004-01-01" + t.datetime :fixed_time, default: "2004-01-01 00:00:00" + t.column :char1, "char(1)", default: "Y" + t.string :char2, limit: 50, default: "a varchar field" + end + create_table :binary_fields, force: true do |t| t.binary :var_binary, limit: 255 t.binary :var_binary_large, limit: 4095 diff --git a/activerecord/test/schema/sqlite_specific_schema.rb b/activerecord/test/schema/sqlite_specific_schema.rb new file mode 100644 index 0000000000..18192292e4 --- /dev/null +++ b/activerecord/test/schema/sqlite_specific_schema.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +ActiveRecord::Schema.define do + create_table :defaults, force: true do |t| + t.date :fixed_date, default: "2004-01-01" + t.datetime :fixed_time, default: "2004-01-01 00:00:00" + t.column :char1, "char(1)", default: "Y" + t.string :char2, limit: 50, default: "a varchar field" + t.text :char3, limit: 50, default: "a text field" + end +end |