Skip to content

Quality of life changes for Prisma#2

Merged
aaron1857 merged 2 commits intomainfrom
prisma-defaults
Mar 2, 2026
Merged

Quality of life changes for Prisma#2
aaron1857 merged 2 commits intomainfrom
prisma-defaults

Conversation

@aaron1857
Copy link
Copy Markdown
Contributor

These are some quality-of-life changes for prisma

  • Update seeding to create a user using our current structure of better auth email OTPs
    • I figured this is better since that is the default for new projects
  • Changed the prisma:reset command to take care of most Prisma commands in one go
    • It resets the DB, migrates pending changes, generates the client, and then seeds it with seed.ts
    • This is safe to run even when a DB or any migrations do not exist (i.e., for new projects).
  • Changes schema.prisma to have a default for IDs. This is because more often than not, the ID is not important and is more of an internal thing. We might as well make Prisma generate a random one instead of doing it ourselves
    • This is only a default; you can still provide an ID when creating a new user and such if you want.
  • Updated README to reflect these changes

Copy link
Copy Markdown
Contributor

@Vikachubro21 Vikachubro21 left a comment

Choose a reason for hiding this comment

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

LGTM

@aaron1857 aaron1857 merged commit 75bf2c0 into main Mar 2, 2026
@aaron1857 aaron1857 deleted the prisma-defaults branch March 2, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants