-
Notifications
You must be signed in to change notification settings - Fork 635
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
[5.x]: Database Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'authorId' in 'field list' #15291
Comments
That migration is supposed to be run as part of the initial Craft 5 upgrade. Did you manually adjust the database or remove rows from the |
We did the migration from Craft cms 4 to 5 some time ago. The upgrade was to 5.0.x. We did not delete any migrations from the DB. |
Do you have a database backup from after the initial Craft 5 upgrade? Is |
No, we do not have such an entry ( Can you just put this entry in the DB I suppose? |
The error you’re getting suggests that the migration has in fact been run before though, as the last thing the migration does is drop the You could manually add the row, but I’d be worried about why it got removed in the first place, and whether other migrations’ rows are also missing. |
I had the same issue when trying to update 5.2.1 to 5.2.4.1, and had a conversation with support about this. Some excerpts from that conversation: We did an update from 5.2.1 to 5.2.4.1 in our pre-production environment, and I'm getting this execption when trying to apply updates:
It looks like Craft has lost track of the previously applied migrations, but only in the track "craft", and is trying to reapply all migrations. Getting the history:
It has not lost the migrations from plugins:
It was not an issue in my local dev environment, and I ended up doing a restore of the migrations table from a backup. |
What happened?
Description
When trying to upgrade Craft CMS from 5.1.5 to 5.2.5, the following error occurs:
Craft CMS version
5.1.5
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: