Keep dropping the documents
table if it exists
This is because we renamed `documents` to `spans`. Co-Authored-By: Kyle Caverly <kyle@zed.dev>
This commit is contained in:
parent
93b889a93b
commit
757a285852
2 changed files with 16 additions and 12 deletions
|
@ -124,6 +124,10 @@ impl VectorDatabase {
|
|||
}
|
||||
|
||||
log::trace!("vector database schema out of date. updating...");
|
||||
// We renamed the `documents` table to `spans`, so we want to drop
|
||||
// `documents` without recreating it if it exists.
|
||||
db.execute("DROP TABLE IF EXISTS documents", [])
|
||||
.context("failed to drop 'documents' table")?;
|
||||
db.execute("DROP TABLE IF EXISTS spans", [])
|
||||
.context("failed to drop 'spans' table")?;
|
||||
db.execute("DROP TABLE IF EXISTS files", [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue