-
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
feat: add section models to corpus db #252
Conversation
6ffc7e5
to
9fa2aee
Compare
// we will not delete Sections, instead deactivate them | ||
active Boolean @default(false) | ||
// track who deactivated the Section | ||
deactivateSource ActivitySource // (ML or MANUAL) |
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.
will add the following:
updatedBy
(or updatedSource
?)
deactivatedAt
active Boolean @default(true) | ||
// track who deactivated the SectionItem | ||
deactivateSource ActivitySource // (ML or MANUAL) | ||
createdAt DateTime @default(now()) |
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.
will add deactivedAt
- rename `ScheduledItemSource` enum to more broad `ActivitySource`
9fa2aee
to
09380a4
Compare
`sort` INTEGER NOT NULL, | ||
`active` BOOLEAN NOT NULL DEFAULT false, | ||
`createSource` ENUM('MANUAL', 'ML') NOT NULL, | ||
`deactivateSource` ENUM('MANUAL', 'ML') NOT NULL, |
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.
🙌
} | ||
|
||
model SectionItem { | ||
id Int @id @default(autoincrement()) |
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.
Wondering if plain id is required here and whether a single externalId would suffice as the id. Or is this the design pattern with primsa?
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.
it's true that we don't need the integer id at the moment. this is more keeping in convention with the rest of the db design - using auto-incrementing ids for internal ids/associations. it's a small data point and shouldn't impact performance.
e201def
Goal
add section models to corpus db to enable ML to create sections for new tab.
ScheduledItemSource
enum to more broadActivitySource
I'd love feedback/perspectives on:
active
anddeactivateSource
fields - do those make sense?Implementation Decisions
Deployment steps
References
JIRA ticket: