Skip to content

Conversation

@Shir0-Kage
Copy link
Contributor

@Shir0-Kage Shir0-Kage commented Jan 12, 2026

Resolves #34

Modified schema.prisma to add new column,
Added migration.sql,
Modified \lib\actions to update current time to updatedAt when update action is called.

Yet to migrate changes to prisma database

Added migration.sql,
Modified \lib\actions to update current time
to updatedAt when update action is called
@Shir0-Kage Shir0-Kage self-assigned this Jan 12, 2026
@Shir0-Kage Shir0-Kage added the enhancement New feature or request label Jan 12, 2026
@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nusc-website Ready Ready Preview, Comment Jan 13, 2026 1:17am

@github-actions github-actions bot added the prisma Pull requests that update prisma code label Jan 12, 2026
Copy link
Collaborator

@TheMythologist TheMythologist left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Could you change the updatedAt fields for all models to be compulsory (non-optional)? Additionally, we don't actually have to update the updatedAt fields in the server actions if we use Prisma's @updatedAt instead of using @default(now()).

Reference: https://www.prisma.io/docs/orm/reference/prisma-schema-reference#updatedat

Copy link
Collaborator

@TheMythologist TheMythologist left a comment

Choose a reason for hiding this comment

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

Remember to regenerate the migration script after the schema is changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request prisma Pull requests that update prisma code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "updatedAt" field

3 participants