Lines 3374-3386
DROP TABLE IF EXISTS `biblioimages`;
Link Here
|
3374 |
|
3374 |
|
3375 |
CREATE TABLE `biblioimages` ( -- local cover images |
3375 |
CREATE TABLE `biblioimages` ( -- local cover images |
3376 |
`imagenumber` int(11) NOT NULL AUTO_INCREMENT, -- unique identifier for the image |
3376 |
`imagenumber` int(11) NOT NULL AUTO_INCREMENT, -- unique identifier for the image |
3377 |
`biblionumber` int(11) NOT NULL, -- foreign key from biblio table to link to biblionumber |
3377 |
`biblionumber` int(11) DEFAULT NULL, -- foreign key from biblio table to link to biblionumber |
|
|
3378 |
`itemnumber` int(11) DEFAULT NULL, -- foreign key from item table to link to itemnumber |
3378 |
`mimetype` varchar(15) NOT NULL, -- image type |
3379 |
`mimetype` varchar(15) NOT NULL, -- image type |
3379 |
`imagefile` mediumblob NOT NULL, -- image file contents |
3380 |
`imagefile` mediumblob NOT NULL, -- image file contents |
3380 |
`thumbnail` mediumblob NOT NULL, -- thumbnail file contents |
3381 |
`thumbnail` mediumblob NOT NULL, -- thumbnail file contents |
3381 |
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- image creation/update time |
3382 |
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- image creation/update time |
3382 |
PRIMARY KEY (`imagenumber`), |
3383 |
PRIMARY KEY (`imagenumber`), |
3383 |
CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE |
3384 |
CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
3385 |
CONSTRAINT `bibliocoverimage_fk2` FOREIGN KEY (`itemnumber`) REFERENCES `item` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
3384 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3386 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3385 |
|
3387 |
|
3386 |
-- |
3388 |
-- |
3387 |
- |
|
|