breaking changes for sync layer authors & app devs -- extra version information #115
tantaman
announced in
Announcements
Replies: 2 comments 1 reply
-
These changes were published as: @vlcn.io/crsqlite 0.6.1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just wondering - will there be a breaking change when support for RGAs (or other CRDTs) arrives? We're using lamport clocks, which as you note are good enough for LWW. Will there be a migration to vector clocks once more complex CRDTs are supported? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you are the author of a sync layer, the latest version of
crsqlite
updates how versions are tracked.The table schema for
crsql_changes
was:but is now:
changes should be pulled from the db by
db_version
:db_version
is a lamport clock for the entire database, allowing peers to know when they're behind some other database.col_version
is a lamport clock for that specific column, allowing peers to merge without bumping the column clock to something neither peer has seenMore details here: #114
If you're an app dev
If you haven't shipped something to production, drop and recreate your tables.
Or, if you don't want to drop base tables:
For each crr:
table__crsql_clock
tablecrr
via:select crsql_as_crr('table')
If you have shipped something to production, you need to migrate all
clock
tables to:version
todb_version
col_version
column. Set thecol_version
value to thedb_version
currently recorded for that row.Beta Was this translation helpful? Give feedback.
All reactions