Skip to content

Migration guide to RailsEventStore::JSONClient #1569

Answered by mostlyobvious
tomasc asked this question in Q&A
Discussion options

You must be logged in to vote

Is that even possible? Would you be able to briefly outline a migration script?

What you want here is changing data and metadata column types in event_store_events table, along with converting its contents to new format.

You can do it either offline (with downtime, stopping new writes) or mostly online (simultaneous writing in two tables, backfilling missing record and finally performing table switch).

In any case you'd probably need two instances of RailsEventStore::Client at hand. One to read existing events from storage, configured for current database columns and used serialization method (i.e. binary + YAML). Second one to be used in new "writes", transforming event objects by the …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mostlyobvious
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1557 on February 05, 2023 18:06.