File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use indexmap::IndexMap;
2020use metrics:: { gauge, histogram} ;
2121use parking_lot:: RwLock ;
2222use rangemap:: RangeInclusiveSet ;
23- use rusqlite:: { named_params, Connection , Transaction } ;
23+ use rusqlite:: { named_params, Connection , OptionalExtension , Transaction } ;
2424use serde:: { Deserialize , Serialize } ;
2525use tokio:: sync:: {
2626 AcquireError , OwnedRwLockWriteGuard as OwnedTokioRwLockWriteGuard , OwnedSemaphorePermit ,
@@ -1364,8 +1364,9 @@ impl BookedVersions {
13641364 // fetch the biggest version we know, a partial version might override
13651365 // this below
13661366 bv. max = conn
1367- . prepare_cached ( "SELECT MAX(site_version) FROM crsql_changes WHERE site_id = ?" ) ?
1368- . query_row ( [ actor_id] , |row| row. get ( 0 ) ) ?;
1367+ . prepare_cached ( "SELECT version FROM crsql_site_versions WHERE site_id = ?" ) ?
1368+ . query_row ( [ actor_id] , |row| row. get ( 0 ) )
1369+ . optional ( ) ?;
13691370
13701371 {
13711372 // fetch known partial sequences
You can’t perform that action at this time.
0 commit comments