-
Notifications
You must be signed in to change notification settings - Fork 1
OUT-2915 | Backfill attachments table from tasks & comments #1102
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
base: feature/api-improvements
Are you sure you want to change the base?
Conversation
…ks and comments that arent deleted
…ks and comments that arent deleted
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| await createAttachmentsInDatabase(db, taskAttachmentRequests) | ||
| await createAttachmentsInDatabase(db, commentAttachmentRequests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| await createAttachmentsInDatabase(db, taskAttachmentRequests) | |
| await createAttachmentsInDatabase(db, commentAttachmentRequests) | |
| await Promise.all([ | |
| createAttachmentsInDatabase(db, taskAttachmentRequests), | |
| createAttachmentsInDatabase(db, commentAttachmentRequests) | |
| ]) |
There was a problem hiding this comment.
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..
…ttachmentRequests in db
…ttachmentRequests in db
Changes
- 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
createdByIdas task created/comment initiator,workspaceIdof comment/task and attachmentRequest.- created those attachments in table if it doesn't already exist.