Content
Database migration problem after Upgrade to 12.5.8 (ArgumentError: Multiple indexes found on custom_fields_projects columns)
Added by Eric Lusis over 1 year ago
Hi, Just tried to update my OP 12.4.1 to latest 12.5.8 and during openproject configure I receive the database migration error:
...
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Multiple indexes found on custom_fields_projects columns [:custom_field_id, :project_id]. Specify an index name from index_custom_fields_projects_on_custom_field_id_and_project_id, index_custom_fields_projects_on_custom_field_id_and_project_id...
...
Full console report with info I receive after "configure" command I attached.
OP resides on Ubuntu 20.04 64bit with all latest security and all available software updates till this day. System was restarted before OP upgrade.
This OP installation was so far succesfully upgraded up to the 12.4.1 all the way starting with 8.x version.
Now the OP stays at the 12.4.1 version with the:
"Your OpenProject installation has pending database migrations. You have likely missed running the migrations on your last upgrade. Please check the upgrade guide to properly upgrade your installation.
Please visit our upgrade guide documentation: Upgrade guides"
status in the footer.
The same migration error was seen after upgrade to any 12.5.x version. I hoped, this problem will be solved by every next 5.x. release, but now is already 12.5.8 version and I finally decided to ask for help.
Thanks!
Replies (6)
found this info here:
https://community.openproject.org/topics/13672?r=13736#message-13736
But I have different situation - both schema have different owners and neither has rights to DROP it.
This is shown under the openproject login - psql:
openproject-> \dn
List of schemas
Name | Owner
-------------+-------------
openproject | openproject
public | postgres
in this database there is no postgres user, but system postgres user does not have the rights to open database. And I have no option to DROP table I do not own, but there is no way to login as that user, that has these rights.
All was done by creating new user in the openproject database with superuser rights, then login with that, then alter drop, alter rename and openproject configure.
Hi Eric,
I have the same behaviour on updating to version 12.5.8.
Honestly I don't understand your solution. Could you please give me some more information on you resolved it?
Find in the web how to login to postgre database engine on the command line - something like psql, then find the way to create new user with password. Then grant this user superuser rights. After that you will be able to login to postgre with this new user with something like psql /c and then I was able to delete old scheme at last. After this procedure configure command was good again.
Thank you for your time and explanation. So I understand it is a permission problem.
May I ask you an additional question? How did you do the following:
then I was able to delete old scheme at last
Hi Eric,
I finally got a solution for my problem (https://community.openproject.org/work_packages/49790) - it was similar to your case but not completely the same.
Thank you for pushing me in the right direction.