Can not deploy to a service stage while there is a deployment in progress... except there isn't one

prisma

#1

When I run docker-compose up -d, wait a little to give Prisma the time to start and then run prisma deploy, I get the following error:

ERROR: You can not deploy to a service stage while there is a deployment in progress or a pending deployment scheduled already. Please try again after the deployment finished.

But there isn’t, and cannot be, another deployment in progress, since I just restarted the container from scratch… Please advise.

EDIT: Also, somebody already asked about this error on SO, but there’s no response there, perhaps you guys might want to chime in… https://stackoverflow.com/questions/54998492/postgresqls-prisma-deploy-command


#2

Hi @jahudka

This happens when there is an unapplied migration in the management schema.

To resolve this(I am assuming you are using postgres connector, procedure is similar for other databases):

  1. Connect to your database using a GUI(like tableplus.io))
  2. Change your database schema to management schema
    image
  3. Goto the migration table
    image
  4. Delete the last row

Then try to redeploy your service.


#3

Thanks, that did the job. Now deploy is failing because Prisma doesn’t support Postgres timestamptz columns, but that’s another battle.


#4

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.