From 6980128a24436012377e15e59f26acc6008b0eda Mon Sep 17 00:00:00 2001 From: rajajisai Date: Thu, 9 Oct 2025 22:50:18 -0400 Subject: [PATCH] Ignore sqlite_sequence table when dumping tables in .clone --- cli/app.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/app.rs b/cli/app.rs index efc2f312f..9551afaf8 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -1453,6 +1453,10 @@ impl Limbo { StepResult::Row => { let row = rows.row().unwrap(); let name: &str = row.get::<&str>(0)?; + // Skip sqlite_sequence table + if name == "sqlite_sequence" { + continue; + } let ddl: &str = row.get::<&str>(1)?; writeln!(out, "{ddl};")?; Self::dump_table_from_conn(&conn, out, name, &mut progress)?; @@ -1567,7 +1571,6 @@ impl Limbo { if !has_seq { return Ok(()); } - writeln!(out, "DELETE FROM sqlite_sequence;")?; if let Some(mut rows) = conn.query("SELECT name, seq FROM sqlite_sequence")? { loop {