Skip to content

Commit d23640e

Browse files
committed
Explain true/false in preserve_positions migration method
1 parent f4197d4 commit d23640e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rails_event_store_active_record/lib/rails_event_store_active_record/generators/templates/v1_v2_migration_template.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ def up
7878
end
7979

8080
def preserve_positions?(stream_name)
81+
# http://railseventstore.org/docs/expected_version/
82+
#
8183
# return true if you use given stream for event sourcing
82-
# return true if you need to have a deterministic order of events
83-
# in that stream
84-
# return true if only one thread is supposed to be writing in that stream
84+
# return true if you use an Integer or :none as
85+
# expected_version when publishing in this stream
8586
#
86-
# return false if this stream is for purely technical purposes
87-
# and multiple threads/processes can be publishing at given time
88-
# and you don't care about the exact order when reading from it
87+
# return false if use use :any (the default) as expected_version
88+
# when publishing to this stream
8989
false
9090
end
9191
end

0 commit comments

Comments
 (0)