[Koha-bugs] [Bug 30276] New: Web-based installer failing on db upgrade for 30060
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 11 09:43:05 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30276
Bug ID: 30276
Summary: Web-based installer failing on db upgrade for 30060
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Installation and upgrade (web-based installer)
Assignee: koha-bugs at lists.koha-community.org
Reporter: magnus at libriotech.no
QA Contact: testopia at bugs.koha-community.org
CC: gmcharlt at gmail.com
Trying to upgrade a gitified test-install to current master, I get this error:
Upgrade to 21.12.00.016 [09:27:15]: Bug 30060 - Update user_permissions to add
primary key and remove null option from code column
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column
'code': used in a foreign key constraint 'user_permissions_ibfk_2' at
/home/magnus/kohaclone-sv/C4/Installer.pm line 738
Dropped any previously created primary key
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column
'code': used in a foreign key constraint 'user_permissions_ibfk_2' at
/home/magnus/kohaclone-sv/C4/Installer.pm line 738
Removed any duplicate rows
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column
'code': used in a foreign key constraint 'user_permissions_ibfk_2' at
/home/magnus/kohaclone-sv/C4/Installer.pm line 738
The table looks like this:
MariaDB [koha_koha]> show create table user_permissions\G
*************************** 1. row ***************************
Table: user_permissions
Create Table: CREATE TABLE `user_permissions` (
`borrowernumber` int(11) NOT NULL DEFAULT '0',
`module_bit` int(11) NOT NULL DEFAULT '0',
`code` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
KEY `user_permissions_ibfk_1` (`borrowernumber`),
KEY `user_permissions_ibfk_2` (`module_bit`,`code`),
CONSTRAINT `user_permissions_ibfk_1` FOREIGN KEY (`borrowernumber`)
REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY (`module_bit`, `code`)
REFERENCES `permissions` (`module_bit`, `code`) ON DELETE CASCADE ON UPDATE
CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
1 row in set (0.00 sec)
MariaDB [koha_koha]> describe user_permissions;
+----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| borrowernumber | int(11) | NO | MUL | 0 | |
| module_bit | int(11) | NO | MUL | 0 | |
| code | varchar(64) | YES | | NULL | |
+----------------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)
And it is currently empty:
MariaDB [koha_sverige]> select * from user_permissions;
Empty set (0.00 sec)
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list