Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple data sources for a single conversation #11509

Merged
merged 4 commits into from
Mar 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add: unique index on conversation datasources
Fraggle committed Mar 20, 2025
commit e107e900fbe28fbe3c50c1837d48093a326d417f
6 changes: 6 additions & 0 deletions front/migrations/db/migration_187.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DROP INDEX CONCURRENTLY "data_sources_workspace_id_conversation_id";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we drop the index before creating the new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, seems that we can't update.


CREATE UNIQUE INDEX CONCURRENTLY "data_sources_workspace_conversation_unique_idx" ON "data_sources" ("workspaceId", "conversationId")
WHERE
"deletedAt" IS NULL
AND "conversationId" IS NOT NULL;