Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkistner committed Nov 8, 2024
1 parent 7edb71f commit aa61c17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions crates/core/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ VALUES(5,
}

if current_version < 6 && target_version >= 6 {
// language=SQLite
apply_v035_fix(local_db)?;
if current_version != 0 {
// Remove dangling rows, but skip if the database is created from scratch.
apply_v035_fix(local_db)?;
}

local_db
.exec_safe(
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ INSERT OR IGNORE INTO ps_updated_rows(row_type, row_id) VALUES(?1, ?2)",

while supersede_statement.step()? == ResultCode::ROW {
// Superseded (deleted) a previous operation, add the checksum
let superseded_op = supersede_statement.column_int64(0)?;
let supersede_checksum = supersede_statement.column_int(1)?;
add_checksum = add_checksum.wrapping_add(supersede_checksum);
op_checksum = op_checksum.wrapping_sub(supersede_checksum);
Expand Down

0 comments on commit aa61c17

Please sign in to comment.