Validate failed: invalid checksum for migration (Evolve )

Viewed 108

I use evolve to automate my database changes and help keep those changes in sync across all my environments and development teams. Before I run the evolve is ok. But I am currently encountering errors in evolve, and the error information shows Validate failed: invalid checksum for migration. Below is the script I use.

C:\Users\HP\Desktop\MywamProject\evolve_2.4.0_Windows-64bit>evolve migrate mysql -c "User Id=root;password=root;Host=localhost;Port=3306;Database=saas_catalogdb;" -l "C:\\Users\\HP\\Desktop\\MywamProject\\mywam.saas.backend.api\\docker-database\\evolve\\catalogdb"
Executing Migrate...
Evolve initialized.
Validate failed: invalid checksum for migration: V120__Insert_into_sa_report_proforma_detail.sql.
Validate failed: invalid checksum for migration: V120__Insert_into_sa_report_proforma_detail.sql.

May I know which part I am getting wrong? Hope someone can guide me on how to solve this problem. Thanks.

1 Answers

You can fix this issue by repair the checksum of already applied migrations. So instead of you put the command as migrate, change it to repair

Example:

evolve repair mysql -c ...the rest of the command you need

Should be like this:

evolve repair mysql -c "User Id=root;password=root;Host=localhost;Port=3306;Database=saas_catalogdb;" -l "C:\\Users\\HP\\Desktop\\MywamProject\\mywam.saas.backend.api\\docker-database\\evolve\\catalogdb"

You can go to this link for more options on the commands and options: https://evolve-db.netlify.app/configuration/options/

Related