improvement: alert before long-running migration

This commit is contained in:
Greg Heartsfield 2023-01-09 22:11:25 -06:00
parent 8aed572989
commit ed336111bb

View File

@ -559,6 +559,7 @@ fn mig_11_to_12(conn: &mut PooledConnection) -> Result<usize> {
// Lookup every replaceable event // Lookup every replaceable event
let mut stmt = tx.prepare("select kind,author from event where kind in (0,3,41) or (kind>=10000 and kind<20000) order by id;")?; let mut stmt = tx.prepare("select kind,author from event where kind in (0,3,41) or (kind>=10000 and kind<20000) order by id;")?;
let mut replaceable_rows = stmt.query([])?; let mut replaceable_rows = stmt.query([])?;
info!("updating replaceable events; this could take awhile...");
while let Some(row) = replaceable_rows.next()? { while let Some(row) = replaceable_rows.next()? {
// we want to capture the event_id that had the tag, the tag name, and the tag hex value. // we want to capture the event_id that had the tag, the tag name, and the tag hex value.
let event_kind: u64 = row.get(0)?; let event_kind: u64 = row.get(0)?;