Add touched/unread inbox issue semantics
This commit is contained in:
2
packages/db/src/migrations/0024_far_beast.sql
Normal file
2
packages/db/src/migrations/0024_far_beast.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "issue_comments_company_issue_created_at_idx" ON "issue_comments" USING btree ("company_id","issue_id","created_at");--> statement-breakpoint
|
||||
CREATE INDEX "issue_comments_company_author_issue_created_at_idx" ON "issue_comments" USING btree ("company_id","author_user_id","issue_id","created_at");
|
||||
5693
packages/db/src/migrations/meta/0024_snapshot.json
Normal file
5693
packages/db/src/migrations/meta/0024_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -169,6 +169,13 @@
|
||||
"when": 1772139727599,
|
||||
"tag": "0023_fair_lethal_legion",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 24,
|
||||
"version": "7",
|
||||
"when": 1772806603601,
|
||||
"tag": "0024_far_beast",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,5 +18,16 @@ export const issueComments = pgTable(
|
||||
(table) => ({
|
||||
issueIdx: index("issue_comments_issue_idx").on(table.issueId),
|
||||
companyIdx: index("issue_comments_company_idx").on(table.companyId),
|
||||
companyIssueCreatedAtIdx: index("issue_comments_company_issue_created_at_idx").on(
|
||||
table.companyId,
|
||||
table.issueId,
|
||||
table.createdAt,
|
||||
),
|
||||
companyAuthorIssueCreatedAtIdx: index("issue_comments_company_author_issue_created_at_idx").on(
|
||||
table.companyId,
|
||||
table.authorUserId,
|
||||
table.issueId,
|
||||
table.createdAt,
|
||||
),
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user