Skip to content

Commit

Permalink
Adding index on NotionDatabase.{connectorId, lastSeenTs} (#6594)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasryaric authored Jul 30, 2024
1 parent 82d7939 commit d42354d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions connectors/migrations/db/migration_10.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Migration created on Jul 30, 2024
CREATE INDEX CONCURRENTLY "notion_databases_connector_id_last_seen_ts" ON "notion_databases" ("connectorId", "lastSeenTs");
1 change: 1 addition & 0 deletions connectors/src/lib/models/notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ NotionDatabase.init(
{ fields: ["lastSeenTs"] },
{ fields: ["lastCreatedOrMovedRunTs"] },
{ fields: ["parentId"] },
{ fields: ["connectorId", "lastSeenTs"], concurrently: true },
{
fields: ["titleSearchVector"],
using: "gist",
Expand Down

0 comments on commit d42354d

Please sign in to comment.