Skip to content

HNT-499: Updating Prisma schema - Adding deactivateReasons on SectionItem #287

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

Conversation

katerinachinnappan
Copy link
Collaborator

@katerinachinnappan katerinachinnappan commented Apr 8, 2025

Goal

Adding new optional field deactivateReasons on SectionItem. Stored as JSON as for MySQL, Prisma does not support native array fields String[]. The client will send an array of string reasons to the graph, and will be stored as JSON.

Deployment steps

  • Deployed to dev

References

JIRA ticket:

active Boolean @default(true)
active Boolean @default(true)
// client sends an array of string reasons, stored as JSON as mysql prisma does not support String[]
deactivateReasons Json?
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious - have you played with this datatype locally? is it easy enough to retrieve and parse and use? do we need to do any encoding before inserting?

Copy link
Collaborator Author

@katerinachinnappan katerinachinnappan Apr 8, 2025

Choose a reason for hiding this comment

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

we should be able to easily do something like:

await prisma.sectionItem.update({
  data: {
    deactivateReasons: ["Dated", "Paywall", "Other"],
  },
})

Copy link
Contributor

@jpetto jpetto left a comment

Choose a reason for hiding this comment

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

the future!

@github-actions github-actions bot deployed to curated-corpus-api-dev April 8, 2025 20:10 Active
@katerinachinnappan katerinachinnappan merged commit 5c3f589 into main Apr 8, 2025
28 checks passed
@katerinachinnappan katerinachinnappan deleted the katerina/HNT-499-add-deactivatedReasons-sectionItem-prisma branch April 8, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants