migrate icon indicating copy to clipboard operation
migrate copied to clipboard

`prisma dev --no-prompt` or `prisma migrate`

Open timsuchanek opened this issue 7 years ago • 6 comments

To quickly get things updated without caring about a watch mode or anything. Basically a non-interactive dev command.

timsuchanek avatar Jun 16 '19 15:06 timsuchanek

A non-interactive command for migrating would be a huge help. Does anyone have a container workflow setup? I'd like to run migrations against new postgres database that I spin up in development but haven't come up with a good way of doing this non-interactively.

mmeinzer avatar Oct 10 '19 22:10 mmeinzer

@mmeinzer Are you asking about running your normal migrations? Then prisma2 lift up should do the job. In any case, you should probably create a new issue for this as @timsuchanek 's suggestion is a different one - he wants to have a command version of the existing dev migrations from Developent Mode of prisma2 dev.

janpio avatar Oct 10 '19 22:10 janpio

@janpio Ah okay - I misunderstood his request then. I was running into issues with prisma2 lift save being interactive but realized that passing a name in - as in prisma2 lift save --name init - eliminates the name prompt.

I realize that the migrations should already be committed to source but in the early stages of our project where we are rapidly changing the schema, we were running into git conflicts.

mmeinzer avatar Oct 10 '19 22:10 mmeinzer

--name foo indeed fixes that problem - we will make sure to highlight that more in the future.

Please do open that new issue and describe your problem - maybe we already have a solution for that or can at least take this into account when we think about how we want to improve Lift (I am currently spending good parts of my day on that, so are very much interested in additional input).

janpio avatar Oct 10 '19 22:10 janpio

Will do! Thanks for your help and work on Prisma2 :+1:

mmeinzer avatar Oct 10 '19 22:10 mmeinzer

Does not exist any more.

janpio avatar May 20 '20 09:05 janpio