mirror of https://github.com/mastodon/mastodon
Add optimistic lock to avoid race conditions when handling votes (#10196)
* Add optimistic lock to avoid race conditions when handling votes * Force-reload polls when getting `ActiveRecord::StaleObjectError`pull/10200/head
parent
b3668a79ec
commit
96f905f409
@ -0,0 +1,6 @@
|
|||||||
|
class AddLockVersionToPolls < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
add_column :polls, :lock_version, :integer, null: false, default: 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue