umami: can't run on v2.3.0. Err msg: migrate found failed migrations in the target database
Describe the Bug
image: docker.umami.dev/umami-software/umami:mysql-latest
SQL: mariaDB 10.3
Database
MySQL
Relevant log output
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
The `02_report_schema_session_data` migration started at 2023-07-13 04:00:33.871 UTC failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "check-db" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19
$ npm-run-all check-db update-tracker start-server
$ node scripts/check-db.js
✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database version check successful.
✗ Command failed: prisma migrate deploy
Error: P3009
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
The `02_report_schema_session_data` migration started at 2023-07-13 04:00:33.871 UTC failed
Error: P3009
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
docker
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16
@bartosjiri Definitely need to keep this in mind when prisma creates MySQL migrations. We will follow the workaround approach for any future migrations. For this one you will have to alter the existing migration like the directions above.
npx prisma migrate resolve --rolled-back "02_report_schema_session_data"to bypass the failed migration.@orilights It looks like the rename column syntax is different for mysql 5.7. You will need to update the migration script to follow this rename syntax. You can run the below steps or update your image to a later version. 5.7 support ends in October 2023.
migration.sqlfile in 02_report_schema_session_data tonpx prisma migrate resolve --rolled-back "02_report_schema_session_data"I am using docker and MySQL 5.7
below is the migration log I found in
_prisma_migrations