You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we first integrated with Prisma, they'd throw a nasty error if you tried to run prisma generate with no model defined in your schema.prisma file. Since prisma generate was automatically invoked every time you ran yarn rw dev it would blow up the dev server.
To get around this, we added a default UserExample model to the schema file so that there was always something there to prevent Prisma from freaking out.
But it looks like Prisma has a more reasonable error message now, so I think the time has come to remove that default model and either just show an example in comments, or link to a documentation page explaining how to use the file. We'll need to double check and see if this is actually an error that breaks the yarn rw dev chain of commands that runs...if so, maybe we can ignore the error and keep going with starting up the dev server:
Motivation
The UserExample can be confusing because if you run your migrations without removing it, you'll now have an extra database table that you never explicitly created.
Detailed proposal
Update the schema.prisma template in the create-redwood-app package
Update the tutorial where it talks about the contents of this file on first open
Update/create any docs explaining schema.prisma
Are you interested in working on this?
I'm interested in working on this
The text was updated successfully, but these errors were encountered:
The UserExample can be confusing because if you run your migrations without removing it, you'll now have an extra database table that you never explicitly created.
@cannikin I am 👍 for this -- one of the first things I do in any new CRWA is remove this model.
Summary
When we first integrated with Prisma, they'd throw a nasty error if you tried to run
prisma generate
with no model defined in yourschema.prisma
file. Sinceprisma generate
was automatically invoked every time you ranyarn rw dev
it would blow up the dev server.To get around this, we added a default
UserExample
model to the schema file so that there was always something there to prevent Prisma from freaking out.But it looks like Prisma has a more reasonable error message now, so I think the time has come to remove that default model and either just show an example in comments, or link to a documentation page explaining how to use the file. We'll need to double check and see if this is actually an error that breaks the
yarn rw dev
chain of commands that runs...if so, maybe we can ignore the error and keep going with starting up the dev server:Motivation
The
UserExample
can be confusing because if you run your migrations without removing it, you'll now have an extra database table that you never explicitly created.Detailed proposal
schema.prisma
template in the create-redwood-app packageschema.prisma
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: