DROP TABLE IF EXISTS courses;
CREATE TABLE `courses` (
`course_id` int(11) NOT NULL AUTO_INCREMENT,
- `department` varchar(20) DEFAULT NULL, -- Stores the authorised value DEPT
+ `department` varchar(80) DEFAULT NULL, -- Stores the authorised value DEPT
`course_number` varchar(255) DEFAULT NULL, -- An arbitrary field meant to store the "course number" assigned to a course
`section` varchar(255) DEFAULT NULL, -- Also arbitrary, but for the 'section' of a course.
`course_name` varchar(255) DEFAULT NULL,
- `term` varchar(20) DEFAULT NULL, -- Stores the authorised value TERM
+ `term` varchar(80) DEFAULT NULL, -- Stores the authorised value TERM
`staff_note` mediumtext,
`public_note` mediumtext,
`students_count` varchar(20) DEFAULT NULL, -- Meant to be just an estimate of how many students will be taking this course/section
`renewalperiod` int(4) default NULL, -- renewal period in the unit set in issuingrules.lengthunit
`reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
`branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
- overduefinescap decimal default NULL, -- the maximum amount of an overdue fine
+ overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
PRIMARY KEY (`branchcode`,`categorycode`,`itemtype`),
KEY `categorycode` (`categorycode`),
KEY `itemtype` (`itemtype`)
`supplierreference` mediumtext, -- not used? always NULL
`purchaseordernumber` mediumtext, -- not used? always NULL
`basketno` int(11) default NULL, -- links this order line to a specific basket (aqbasket.basketno)
- `biblioitemnumber` int(11) default NULL, -- links this order line the biblioitems table (biblioitems.biblioitemnumber)
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this order line was last modified
`rrp` decimal(13,2) default NULL, -- the replacement cost for this line item
`ecost` decimal(13,2) default NULL, -- the estimated cost for this line item
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;