mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: saving drafts unconditionally increases sequence
Previously we only changed sequence on ownership change, this cause a race condition between tabs where user could type for a long time without being warned of an out of date draft. This change is a radical change and we should watch closely. Code was already in place to track sequence on the client so no changes are needed there.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ChangeDraftSequenceToBigint < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
change_column :drafts, :sequence, :bigint, default: 0, null: false
|
||||
change_column :draft_sequences, :sequence, :bigint, null: false
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user