Skip to content

Conversation

@arpandhakal
Copy link
Collaborator

@arpandhakal arpandhakal commented Jan 20, 2026

Changes

  • backfilling script for attachments table from all tasks and comments that aren'tt deleted.
  • In the script :
    - Listed all tasks and comments.
    - Traversed bodies of all tasks and comments and extracted attachments and images, created a data map (attachment request) for all the attachments with createdById as task created/comment initiator, workspaceId of comment/task and attachmentRequest.
    - created those attachments in table if it doesn't already exist.

@arpandhakal arpandhakal requested a review from rrojan January 20, 2026 11:20
@arpandhakal arpandhakal self-assigned this Jan 20, 2026
@linear
Copy link

linear bot commented Jan 20, 2026

@vercel
Copy link
Contributor

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
tasks-app Ready Ready Preview, Comment Jan 23, 2026 5:36am

Request Review

@arpandhakal arpandhakal changed the title OUT-2195 | Backfill attachments table from tasks & comments OUT-2915 | Backfill attachments table from tasks & comments Jan 20, 2026
Comment on lines 143 to 144
await createAttachmentsInDatabase(db, taskAttachmentRequests)
await createAttachmentsInDatabase(db, commentAttachmentRequests)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
await createAttachmentsInDatabase(db, taskAttachmentRequests)
await createAttachmentsInDatabase(db, commentAttachmentRequests)
await Promise.all([
createAttachmentsInDatabase(db, taskAttachmentRequests),
createAttachmentsInDatabase(db, commentAttachmentRequests)
])

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or createAttachmentsInDatabase(db, [...taskAttachmentRequests, ...commentAtttachmentRequests]) ?
Not sure if it works..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants