DROP TABLE IF EXISTS `biblioimages`;
-CREATE TABLE `biblioimages` (
- `imagenumber` int(11) NOT NULL AUTO_INCREMENT,
- `biblionumber` int(11) NOT NULL,
- `mimetype` varchar(15) NOT NULL,
- `imagefile` mediumblob NOT NULL,
- `thumbnail` mediumblob NOT NULL,
+CREATE TABLE `biblioimages` ( -- local cover images
+ `imagenumber` int(11) NOT NULL AUTO_INCREMENT, -- unique identifier for the image
+ `biblionumber` int(11) NOT NULL, -- foreign key from biblio table to link to biblionumber
+ `mimetype` varchar(15) NOT NULL, -- image type
+ `imagefile` mediumblob NOT NULL, -- image file contents
+ `thumbnail` mediumblob NOT NULL, -- thumbnail file contents
PRIMARY KEY (`imagenumber`),
CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
DROP TABLE IF EXISTS quotes;
-CREATE TABLE `quotes` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `source` text DEFAULT NULL,
- `text` mediumtext NOT NULL,
- `timestamp` datetime NOT NULL,
+CREATE TABLE `quotes` ( -- data for the quote of the day feature
+ `id` int(11) NOT NULL AUTO_INCREMENT, -- unique id for the quote
+ `source` text DEFAULT NULL, -- source/credit for the quote
+ `text` mediumtext NOT NULL, -- text of the quote
+ `timestamp` datetime NOT NULL, -- date and time that the quote last appeared in the opac
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;