Kevin Huang
07/07/2021, 2:54 PM10:22:13.228 Error: P3009
10:22:13.228 migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: <https://pris.ly/d/migrate-resolve>
10:22:13.228 The `20210702212552_add_unique_constraint_to_job` migration started at 2021-07-07 13:52:17.927259 UTC failed with the following logs:
10:22:13.245 error Command failed with exit code 1.
And this is the migrate from the error above:
/*
Warnings:
- A unique constraint covering the columns `[queueId]` on the table `Job` will be added. If there are existing duplicate values, this will fail.
- Made the column `vendorResponded` on table `Job` required. This step will fail if there are existing NULL values in that column.
- Made the column `status` on table `Job` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "Job" ALTER COLUMN "vendorResponded" SET NOT NULL,
ALTER COLUMN "status" SET NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "Job.queueId_unique" ON "Job"("queueId");
I'm assuming the issue is coming from added REQUIRED
constraint to vendorRespond
and status
columns.
I'm trying to following along this guide here to resolve the issue, I'm a bit confused on how to approach it.
Where are you supposed to run this command in the guide?
From your local machine or you need to ssh into the production machine to do so? Many thanks!
prisma migrate resolve --rolled-back "20201127134938_added_bio_index"
Kevin Huang
07/07/2021, 3:39 PMprisma migrate resolve --rolled-back
.
This might be out of scope here, but I'm currently using Vercel as the deployment platform. Does anyone know if it's possible to log onto vercel's prod env and run prisma migrate resolve?janpio
Kevin Huang
07/07/2021, 6:01 PMprisma migrate resolve --rolled-back
if there's a failed migration in prod?janpio
janpio
janpio
Kevin Huang
07/08/2021, 12:18 AMjanpio