-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error during migration when updating to Formie 4.13.8: "Integrity constraint violation - Duplicate entry" #2238
Comments
That error seems to point to the fact that the migration has already been run on that environment, but it's trying to run it again. I know you mention Formie 4.13.8, but this seems to be Craft 4.13.8, correct? That shouldn't happen under normal circumstances. You could potentially remove that row from the |
Thank you and apologies for the confusion earlier. The updates involve:
Just to clarify, based on your explanation, can this message be safely ignored? Would you confirm that neither a rollback nor further investigation is necessary in this case? |
It's a pretty safe migration to re-run, as it creates email notification handles, which previously didn't exist, which was my recommendation to remove that row in the migrations table (and the migration would run again). I'm not quite sure why or how it's gotten to that state though. |
After deleting the row in the database and re-running the migration, everything proceeded smoothly: ./craft migrate/all
Checking for pending migrations ...
Total 1 new Formie migration to be applied:
- m231223_000000_notification_handle
Apply the above migration? (yes|no) [no]: yes
Create database backup? (yes|no) [yes]: yes
Backing up the database ... done
*** applying m231223_000000_notification_handle
> update in {{%formie_notifications}} ... done (time: 0.001s)
> update in {{%formie_notifications}} ... done (time: 0.000s)
...
*** applied m231223_000000_notification_handle (time: 0.070s)
1 migration was applied.
Migrated up successfully. Thank you for the clarification—it was very helpful! |
Describe the bug
After updating my Craft CMS site to Formie
2.1.38
, I ran the standard post-deployment maintenance tasks:During this process, I encountered the following error related to applying Formie modifications:
The error seems to occur during the migration
m231223_000000_notification_handle
, specifically on duplicate entries. My site contains many complex multi-tab forms, and testing every form across all scenarios would be a time-intensive task.The migration should complete without errors, applying all necessary updates to the Formie plugin seamlessly.
Could you please provide insights into what caused this error and how to resolve it effectively without having to test every form manually?
Steps to reproduce
./craft migrate/all
and./craft project-config/apply
.Form settings
Craft CMS version
4.13.10
Plugin version
2.1.38
Multi-site?
Yes
Additional context
No response
The text was updated successfully, but these errors were encountered: