aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/schema.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-04-28 00:23:50 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-06-21 00:46:23 +0300
commit4d1264cb5afb93dba198dc559c22a88521fc45c4 (patch)
treefff3410cce7656b2b149528e3f60a39b4775dc12 /activerecord/test/schema/schema.rb
parent890de7705257323d05c8831b8c1ab43433b0ba89 (diff)
downloadrails-4d1264cb5afb93dba198dc559c22a88521fc45c4.tar.gz
rails-4d1264cb5afb93dba198dc559c22a88521fc45c4.tar.bz2
rails-4d1264cb5afb93dba198dc559c22a88521fc45c4.zip
Fix ActiveRecord::Persistence#touch with locking
`ActiveRecord::Persistence#touch` does not work well when optimistic locking enabled and `locking_column`, without default value, is null in the database.
Diffstat (limited to 'activerecord/test/schema/schema.rb')
-rw-r--r--activerecord/test/schema/schema.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index dc8bdb98ff..6da0ef26f6 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -453,11 +453,13 @@ ActiveRecord::Schema.define do
create_table :lock_without_defaults, force: true do |t|
t.column :title, :string
t.column :lock_version, :integer
+ t.timestamps null: true
end
create_table :lock_without_defaults_cust, force: true do |t|
t.column :title, :string
t.column :custom_lock_version, :integer
+ t.timestamps null: true
end
create_table :magazines, force: true do |t|