-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add discovery repository #8
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -11,8 +11,14 @@ declare module 'knex/types/tables' { | |||
last_updated: Date | |||
} | |||
|
|||
interface DiscoveryRow { | |||
one_row_id: true |
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.
Why one_row_id
? 😄
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.
This is a trick that makes sure we store only one row in this table.
|
||
function toRecord(row: DiscoveryRow): DiscoveryRecord { | ||
return { | ||
discoveryOutput: row.discovery_json_blob as unknown as DiscoveryOutput, |
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.
Maybe we should consider schema validation in the future ❔
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.
I think this is not necessary, as only this repository will write to this table. I think that we could be storing individual values in the future (maybe). I agree that this is something we should think about.
270dc24
to
40b413b
Compare
Resolves L2B-2261