-
-
Notifications
You must be signed in to change notification settings - Fork 3
Sync collection #74
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: main
Are you sure you want to change the base?
Sync collection #74
Conversation
| .values(result) | ||
| .onConflictDoUpdate({ target: [collectionData.slug, collectionData.locale], set: result }); | ||
|
|
||
| // TODO: How to handle authors? |
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.
From @fennifith:
You can assume the author profile should already exist in the db (if they don't, the task should fail) - so it's just a matter of adding to the
collection_authorstable.
| slug: text("slug").primaryKey(), | ||
| }); | ||
|
|
||
| // TODO: This is missing a ton of fields that are in the Collections task type, what do? |
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.
Not sure what type you're referencing here? What fields are missing?
The collection_data table does not need to contain every value that's in the frontmatter IMO - it should all be available in the meta column regardless.
| ], | ||
| ); | ||
|
|
||
| // TODO: Do we need this in the DB or can it just be in the meta JSON? |
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.
Yes, to support queries like "list posts by collection". These can't be added until the post is created, though - sync-post will need to additionally fetch the collection data to create this record.
Closes #32
Needs a review to address code
// TODOs, since it will impact how we handle the code from here outOther TODOs