Dimitri Ivashchuk
09/04/2021, 1:03 PM10:54:13.919 Error: P3018
10:54:13.919 A migration failed to apply. New migrations can not be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: <https://pris.ly/d/migrate-resolve>
10:54:13.919 Migration name: 20210904075303_add_new_heats_structure
10:54:13.919 Database error code: 23502
10:54:13.919 Database error:
10:54:13.919 Database error
10:54:13.919 Null constraint failed: (property)
10:54:13.919 0: migration_core::api::ApplyMigrations
10:54:13.919 at migration-engine/core/src/api.rs:73
10:54:13.933 error Command failed with exit code 1.
10:54:13.934 info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
10:54:13.950 Error: Command "yarn run vercel-build" exited with 1
First question: what would be the correct way to resolve this in two cases:
1. if I care about the data
2. if I don't care if data is lost(this is the case now, but in the future I bet it could be different)
Shall I just drop the database and redeploy on vercel? Or there is some prisma magic command that could help meRyan
09/06/2021, 5:48 AMmigrate dev and applying them on production using migrate deploy is the way to go.
As for resolving the current case,
1. If you care about the data, try baselining your production database to match the state of your development one.
2. If you don’t care, then simply running prisma migrate reset should do it.Dimitri Ivashchuk
09/06/2021, 6:13 AMDimitri Ivashchuk
09/06/2021, 6:13 AMDimitri Ivashchuk
09/06/2021, 6:13 AMDimitri Ivashchuk
09/06/2021, 6:13 AMRyan
09/06/2021, 6:17 AMDimitri Ivashchuk
09/06/2021, 10:28 AMDimitri Ivashchuk
09/06/2021, 10:28 AM