is it possible to have prisma directly build the s...
# orm-help
c
is it possible to have prisma directly build the schema in an empty database directly from the prisma file, instead of having to create the migration? the use case is a local test database that i’m running integration tests against and when when making small changes to the prisma file, the step of creating a migration is one too many. i’m looking for a way to rebuild the database from scratch based on the current contents of the prisma file (i’ll make the migration later, once the changes are settled and tested)
1
f
Hi Chris, I usually just have a shellscript which drops the db, deletes the migrations folder and creates & runs a new initial migration. Works well for me.
c
yep that’s pretty much what i want! i have some migrations already so know if there’s a way to tell prisma to look somewhere else for the migrations folder? (that one would just contain this initial migration)
actually it looks like i can
prisma migrate reset --force
then
prisma db push --accept-data-loss
to do what i want 😮
☝️ 1
n
@Chris Graves Glad that you found the workflow which fits your use case, do let us know in case you face any issues. 👍
👍 1