[Bug 6175] New: Mismatch between marc_subfield_structure and authorised_values tables
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 Bug #: 6175 Summary: Mismatch between marc_subfield_structure and authorised_values tables Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_6 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Database AssignedTo: gmcharlt@gmail.com ReportedBy: conan@lugmen.org.ar QAContact: koha-bugs@lists.koha-community.org kohastructure.sql defines: marc_subfield_structure.authorised_value varchar(20) default NULL this column points to: authorised_values.category varchar(10) NOT NULL default '' Quick fix is straightforward: modify marc_subfield_structure to match authorised_values definition. However there's been a request to expand size for category column (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5458). Also there is discussion to make all references to authorised_values.category foreign key references on koha-dev list. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 Fernando L. Canizo <conan@lugmen.org.ar> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |P3 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 --- Comment #1 from Fernando L. Canizo <conan@lugmen.org.ar> 2011-04-13 16:19:55 UTC --- Created attachment 3911 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3911 Fix mismatch, add foreign key constraints, reshuffle sql scripts, fix UI to match DB -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 --- Comment #2 from Fernando L. Canizo <conan@lugmen.org.ar> 2011-04-14 11:34:53 UTC --- (In reply to comment #1)
Created attachment 3911 [details] Fix mismatch, add foreign key constraints, reshuffle sql scripts, fix UI to match DB
This is broken, working on new one. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |jcamins@cpbibliography.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3911|0 |1 is obsolete| | --- Comment #3 from MJ Ray (software.coop) <mjr@software.coop> --- Created attachment 10086 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10086&action=edit Bug 6175 Mismatch on tables definition kohastructure.sql defines: marc_subfield_structure.authorised_value varchar(20) this column points to: authorised_values.category varchar(10) At first tought you would think about shortening in marc_subfield_structure table, but install scripts had values longer than 10 characters. Also there's been talk in the list about expanding the column. So: - Expand on authorised_values.category. - Add foreign keys constraints. - Reshuffle sql scripts to allow insertions given the new constraints. - Expand template input text field to match database column. Signed-off-by: MJ Ray <mjr@phonecoop.coop> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off CC| |mjr@software.coop --- Comment #4 from MJ Ray (software.coop) <mjr@software.coop> --- At a basic level, this looks like it works (it now applies and tests pass), so I have signed it off. If the brokenness was more subtle/structural, please make it Failed QA. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: This patch has some problems: * it introduces a constraint that is wrong: + CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_values` (`category`) ON DELETE CASCADE ON UPDATE CASCADE => the constraint can be on authorised_values, but also on branches or itemtype, so a SQL constraint is unapplicable here * it contains a lot of changes in french file that are just moving things from the bottom to the top of file without reason (at least without relation to this patch. As the patch has been made by someone from argentina, I think it was not intended to update french files !) * there is no updatedatabase part on this patch making existing Koha being de-synchronised from freshly installed Koha for those reasons, failed QA, sorry -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6175 --- Comment #6 from MJ Ray (software.coop) <mjr@software.coop> --- (In reply to comment #5)
QA comment: This patch has some problems: * it introduces a constraint that is wrong: + CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_values` (`category`) ON DELETE CASCADE ON UPDATE CASCADE => the constraint can be on authorised_values, but also on branches or itemtype, so a SQL constraint is unapplicable here
So is this potential mismatch unavoidable with the current database design?
* it contains a lot of changes in french file that are just moving things from the bottom to the top of file without reason (at least without relation to this patch. As the patch has been made by someone from argentina, I think it was not > intended to update french files !) * there is no updatedatabase part on this patch making existing Koha being de-synchronised from freshly installed Koha
These are not currently among the http://wiki.koha-community.org/wiki/Coding_Guidelines#Database but perhaps they should be? This would not be the first patch to change kohastructure.sql without a matching updatedatabase, after all... but I remember them because they caused bugs, so maybe it should be a guideline. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org