Showing posts with label Koha Bug - Upgrading 23.05 to 23.11. Show all posts
Showing posts with label Koha Bug - Upgrading 23.05 to 23.11. Show all posts

[Koha-bugs] [Bug 34276] upgrading 23.05 to 23.11

Got a problem while upgrading Koha database from 23.05 to 23.11.....

 

While upgrading it shows the above error

Solution: 

1. Login to MySQL with root 

mysql -u root -p

[enter password]

2. Choose the database 

use koha_library;

3. Execute the below SYNTAX

SELECT RefCons.constraint_schema, RefCons.table_name,
RefCons.referenced_table_name, RefCons.constraint_name, KeyCol.column_name
FROM information_schema.referential_constraints RefCons
JOIN information_schema.key_column_usage KeyCol ON RefCons.constraint_schema =
KeyCol.table_schema
     AND RefCons.table_name = KeyCol.table_name
     AND RefCons.constraint_name = KeyCol.constraint_name
WHERE RefCons.constraint_schema = 'koha_nit';
 
[replace koha_nit with your database name]

4. Locate illrequests_ibfk_1
It may not be available and while dropping the above, it may not allow. 
5. Execute the following syntax to solve the problem
ALTER TABLE illrequests DROP FOREIGN KEY illrequests_ibfk_2; 
ALTER TABLE illrequests DROP KEY illrequests_bibfk;

6. Exit from MySQL database.  
7. Now execute the below syntaxt to upgrade database from root. 
koha-upgrade-schema nit [replace nit with your database name] 
 
It will upgrade your database!
 
Enjoy !
 
Thanks 
DP Tripathi