Skip to content

Comments

Quality of life changes for Prisma#2

Open
aaron1857 wants to merge 2 commits intomainfrom
prisma-defaults
Open

Quality of life changes for Prisma#2
aaron1857 wants to merge 2 commits intomainfrom
prisma-defaults

Conversation

@aaron1857
Copy link

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

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.

1 participant