Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(storage): escape quotes in index names when retiring tables

Steven Enamakel3aef4919c26b
diff --git a/crates/openhuman-core/src/storage/local.rs b/crates/openhuman-core/src/storage/local.rs
index 318e9c02d7..6cff339ca3 100644
--- a/crates/openhuman-core/src/storage/local.rs
+++ b/crates/openhuman-core/src/storage/local.rs
@@ -399,7 +399,8 @@ fn retire_tables(db_path: &Path, tables: &[&str]) -> Result<()> {
.query_map([table], |row| row.get(0))?
.collect::<rusqlite::Result<_>>()?;
for index in indexes {
- tx.execute_batch(&format!("DROP INDEX \"{index}\""))?;
+ let quoted = index.replace('"', "\"\"");
+ tx.execute_batch(&format!("DROP INDEX \"{quoted}\""))?;
}
tx.execute_batch(&format!("ALTER TABLE \"{table}\" RENAME TO \"{target}\""))
.with_context(|| format!("rename {table} to {target}"))?;
diff --git a/vendor/tinybus b/vendor/tinybus
index 108ae892ef..ea92d19a41 160000
--- a/vendor/tinybus
+++ b/vendor/tinybus
@@ -1 +1 @@
-Subproject commit 108ae892ef0c1f99155428040d3d7438fdec8d25
+Subproject commit ea92d19a4130a0fb945d837f17034aea9a130c26