Skip to content

Commit

Permalink
use db_version for col_version
Browse files Browse the repository at this point in the history
This ensures that if two fields should always change together that they always will as when one loses a merge the other one will also lose the merge.

Hmm, except in the case where the clocks are equal and then we tie break on value. Would be better to tie break on peer id for consistency.
  • Loading branch information
tantaman committed Oct 12, 2023
1 parent ea88d5f commit 1b45a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/rs/core/src/tableinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ impl TableInfo {
?,
NULL WHERE true
ON CONFLICT DO UPDATE SET
col_version = col_version + 1,
col_version = crsql_next_db_version(),
db_version = ?,
seq = ?,
site_id = NULL;",
Expand Down

0 comments on commit 1b45a97

Please sign in to comment.