You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to run the Providence migrations from 195 to 197 via web and due to the issue reported in #1644 the migration was failing.
On the frontend CA reported "Could not connect to database. Check your database configuration in setup.php: 1061" but that wasn't actually the problem.
In CA logs was the actual problem:
app/log/log_db_errors_2024-11-05.txt <==
2024-11-05 21:01:05 - ERROR --> [1::1954859] {"code":245,"errorNumber":1061,"errorMessage":"Duplicate key name 'i_created_on'","sql":"\/*\n\tDate: 29 May 2024\n\tMigration: 197\n\tDescription: Add indexes to improve performance of created: and modified: searches\n*\/\n\n\/*==========================================================================*\/\n\ncreate index i_created_on on ca_change_log(logged_table_num, changetype, log_datetime);\n","stacktrace":"\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/Db\/mysqli.php::caPrintStacktrace@356<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/Db\/DbStatement.php:Db_mysqli:execute@150<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/Db.php:DbStatement:executeWithParamsAsArray@261<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/BaseVersionUpdater.php:Db:query@128<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/BaseVersionUpdater.php:BaseVersionUpdater:performDatabaseUpdate@91<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/ConfigurationCheck.php:BaseVersionUpdater:applyDatabaseUpdate@617<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/themes\/default\/views\/system\/configuration_error_schema_update_html.php:ConfigurationCheck:performDatabaseSchemaUpdate@48<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/app\/lib\/ConfigurationCheck.php::require_once@123<br\/>\n\n\/srv\/example.collectiveaccess.au\/providence\/index.php:ConfigurationCheck:updateDatabaseSchema@51<br\/>\n"}
After modifying the migration I refreshed the CA frontend (which was showing that error) and the site appeared to hang - but it was due to CA actually starting the migration and the DB getting to work.
The text was updated successfully, but these errors were encountered:
goetzk
changed the title
Please make failed migrations give a different error than 'could not connect to db'.
Please make failed migrations give a different error than 'could not connect to db'
Nov 5, 2024
I was trying to run the Providence migrations from 195 to 197 via web and due to the issue reported in #1644 the migration was failing.
On the frontend CA reported "Could not connect to database. Check your database configuration in setup.php: 1061" but that wasn't actually the problem.
In CA logs was the actual problem:
After modifying the migration I refreshed the CA frontend (which was showing that error) and the site appeared to hang - but it was due to CA actually starting the migration and the DB getting to work.
The text was updated successfully, but these errors were encountered: