We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6abcfae commit 4794a1aCopy full SHA for 4794a1a
server/src/repositories/database.repository.ts
@@ -247,7 +247,10 @@ export class DatabaseRepository {
247
return;
248
}
249
const dimSize = await this.getDimensionSize(table);
250
- await sql`DROP INDEX IF EXISTS ${sql.raw(indexName)}`.execute(this.db);
+ await this.db.schema.dropIndex(indexName).ifExists().execute();
251
+ if (table === 'smart_search') {
252
+ await this.db.schema.alterTable(table).dropConstraint('dim_size_constraint').ifExists().execute();
253
+ }
254
await this.db.transaction().execute(async (tx) => {
255
if (!rows.some((row) => row.columnName === 'embedding')) {
256
this.logger.warn(`Column 'embedding' does not exist in table '${table}', truncating and adding column.`);
0 commit comments