https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37054
--- Comment #77 from Tomás Cohen Arazi (tcohen) <[email protected]> --- I feel the need to express this — open to discussion and happy to be corrected. I’d like us to stop adding columns to core entities like `branches` for presentation or rules-related settings. * Mixing business data (branches) with presentation/styling data (like CSS) breaks the MVC principle. * Styling concerns belong in the front end (or a dedicated configuration layer), not in the core database model. It’s perfectly fine for styling data to live in the database — but why not use a dedicated table? ```sql CREATE TABLE library_ui_tweaks ( branchcode VARCHAR(10) PRIMARY KEY, tweaks JSON, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ); ``` Even in the API, putting style info directly on the branch object feels out of place. It should be returned as an embedded resource or sub-object, not part of the core representation. And you know what’s coming next: someone will want a global default that can be overridden at the library level. Boom — another syspref gets added. We’ve seen this pattern repeatedly: a quick fix becomes permanent and clutters our model. Y’all know I’ll eventually rant about the `configurations` table again, but seriously — this is exactly the kind of case where we should stop being pragmatic and start doing things the right way. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
