| Summary: | Incorrect data type in auth_subfield_structure | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Chris Nighswonger <chris.nighswonger> |
| Component: | Database | Assignee: | Galen Charlton <gmcharlt> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Bugs List <koha-bugs> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | jonathan.druart, paul.poulain, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 17258 | ||
Bug still valid in 3.6 I think the NOT NULL is not necessary, so I propose we change to NULL The files described here appear to remain unchanged from when this bug was reported but obviously there are not critical consequences since the bug has not been touched in years. Is this bug really valid? If so, is it really a critical bug? For information:
MariaDB [koha]> INSERT INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `tab`, `authorised_value`, `value_builder`, `seealso`, `isu
rl`, `hidden`, `linkid`, `kohafield`, `frameworkcode`) VALUES
-> ('', '000', '@', 'fixed length control field', 'fixed length control field', 0, 1, 0, NULL, 'marc21_leader_authorities.pl', NULL, 0, 0, '', '', '');
Query OK, 1 row affected, 1 warning (0.08 sec)
MariaDB [koha]> show warnings;
+---------+------+----------------------------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------------------------+
| Warning | 1366 | Incorrect integer value: '' for column 'linkid' at row 1 |
+---------+------+----------------------------------------------------------+
1 row in set (0.00 sec)
MariaDB [koha]> select linkid from auth_subfield_structure where tagfield='000';
+--------+
| linkid |
+--------+
| 0 |
+--------+
1 row in set (0.00 sec)
Not critical at all, considered as minor. Feel free to change it if you disagree. |
kohastructure.sql makes auth_subfield_structure.linkid a tinyint(1) NOT NULL, but then authorities_normal_marc21.sql tries to insert an null string value for that field. From kohastructure.sql: DROP TABLE IF EXISTS `auth_subfield_structure`; CREATE TABLE `auth_subfield_structure` ( ... `linkid` tinyint(1) NOT NULL default 0, ... From authorities_normal_marc21.sql : INSERT INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `tab`, `authorised_value`, `value_builder`, `seealso`, `isurl`, `hidden`, `linkid`, `kohafield`, `frameworkcode`) VALUES ('', '000', '@', 'fixed length control field', 'fixed length control field', 0, 1, 0, NULL, 'marc21_leader_authorities.pl', NULL, 0, 0, '', '', '') ...