Closed ucamhal closed 10 years ago
Apparently we don't have the latest dump of the database on the dev instance (new_opening
column is missing in libraries
table). Maybe @timdegroote knows how/where to fetch a copy of the latest data/structure.
CREATE TABLE `libraries` (
`library_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`library_code` varchar(5) NOT NULL DEFAULT '',
`library_name` varchar(100) NOT NULL DEFAULT '',
`dbase_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
`library_system_id` tinyint(3) unsigned NOT NULL DEFAULT '1',
`cs_id` tinyint(3) unsigned NOT NULL DEFAULT '1',
`security_system_id` tinyint(3) unsigned NOT NULL DEFAULT '1',
`has_items` enum('Y','N') NOT NULL DEFAULT 'Y',
`type_code` enum('C','D','O','U','E') NOT NULL DEFAULT 'C',
`UC_id` tinyint(1) unsigned NOT NULL DEFAULT '1',
`library_notes` text,
`display_index` tinyint(3) unsigned NOT NULL DEFAULT '0',
`library_display_name` varchar(100) DEFAULT NULL,
`admits` text,
`stock` text,
`special_collections` text,
`services` text,
`opening_hours` text,
`publications` varchar(250) DEFAULT NULL,
`see` varchar(250) DEFAULT NULL,
`see_also` varchar(250) DEFAULT NULL,
`display_notes` text,
`display_only` enum('Y','N') NOT NULL DEFAULT 'N',
`contributes_to` varchar(250) DEFAULT NULL,
`uses_newton` enum('Y','N') NOT NULL DEFAULT 'Y',
PRIMARY KEY (`library_id`)
) ENGINE=MyISAM AUTO_INCREMENT=129 DEFAULT CHARSET=latin1;
I've got a copy of the latest I could give you. Tim dumped it from the db on Fri.
This has been fixed in https://github.com/CUL-DigitalServices/libraries-gateway/pull/229
See the postit on the library gateway board. The complaint is that opening hours are not always displayed (even though they are in the library directory).
I've looked into this and the code is accessing the wrong opening hours column (there are 3!).
It's reading
libraries.opening_hours
, but should be usinglibraries.new_opening
which is what the library directory uses.2 examples: http://www.libraries.cam.ac.uk/find-a-library/ancient-india-and-iran-trust http://www.lib.cam.ac.uk/libraries_directory/libraries_directory.cgi?library_id=71&type_code=A
http://www.lib.cam.ac.uk/libraries_directory/libraries_directory.cgi?library_id=38&type_code=A http://www.libraries.cam.ac.uk/find-a-library/computer-laboratory