Skip to content

Commit c01567a

Browse files
committed
improvement(queries): added missing indexes
1 parent 6de1c04 commit c01567a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/db/schema.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export const verification = pgTable(
108108
},
109109
(table) => ({
110110
identifierIdx: index('verification_identifier_idx').on(table.identifier),
111+
expiresAtIdx: index('verification_expires_at_idx').on(table.expiresAt),
111112
})
112113
)
113114

@@ -197,6 +198,7 @@ export const workflowBlocks = pgTable(
197198
},
198199
(table) => ({
199200
workflowIdIdx: index('workflow_blocks_workflow_id_idx').on(table.workflowId),
201+
typeIdx: index('workflow_blocks_type_idx').on(table.type),
200202
})
201203
)
202204

@@ -618,6 +620,8 @@ export const apiKey = pgTable(
618620
'workspace_type_check',
619621
sql`(type = 'workspace' AND workspace_id IS NOT NULL) OR (type = 'personal' AND workspace_id IS NULL)`
620622
),
623+
workspaceTypeIdx: index('api_key_workspace_type_idx').on(table.workspaceId, table.type),
624+
userTypeIdx: index('api_key_user_type_idx').on(table.userId, table.type),
621625
})
622626
)
623627

0 commit comments

Comments
 (0)