Lines 1700-1705
CREATE TABLE `opac_news` ( -- data from the news tool
Link Here
|
1700 |
|
1700 |
|
1701 |
DROP TABLE IF EXISTS `overduerules`; |
1701 |
DROP TABLE IF EXISTS `overduerules`; |
1702 |
CREATE TABLE `overduerules` ( -- overdue notice status and triggers |
1702 |
CREATE TABLE `overduerules` ( -- overdue notice status and triggers |
|
|
1703 |
`overduerules_id` mediumint NOT NULL AUTO_INCREMENT, |
1703 |
`branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table to define which branch this rule is for (if blank it's all libraries) |
1704 |
`branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table to define which branch this rule is for (if blank it's all libraries) |
1704 |
`categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for |
1705 |
`categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for |
1705 |
`delay1` int(4) default NULL, -- number of days after the item is overdue that the first notice is sent |
1706 |
`delay1` int(4) default NULL, -- number of days after the item is overdue that the first notice is sent |
Lines 1711-1717
CREATE TABLE `overduerules` ( -- overdue notice status and triggers
Link Here
|
1711 |
`delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent |
1712 |
`delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent |
1712 |
`letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice |
1713 |
`letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice |
1713 |
`debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
1714 |
`debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
1714 |
PRIMARY KEY (`branchcode`,`categorycode`) |
1715 |
PRIMARY KEY (`overduerules_id`) |
1715 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1716 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1716 |
|
1717 |
|
1717 |
-- |
1718 |
-- |
Lines 2595-2606
CREATE TABLE `message_transport_types` (
Link Here
|
2595 |
DROP TABLE IF EXISTS `overduerules_transport_types`; |
2596 |
DROP TABLE IF EXISTS `overduerules_transport_types`; |
2596 |
CREATE TABLE overduerules_transport_types( |
2597 |
CREATE TABLE overduerules_transport_types( |
2597 |
`id` INT(11) NOT NULL AUTO_INCREMENT, |
2598 |
`id` INT(11) NOT NULL AUTO_INCREMENT, |
2598 |
`branchcode` varchar(10) NOT NULL DEFAULT '', |
2599 |
`overduerules_id` mediumint NOT NULL, |
2599 |
`categorycode` VARCHAR(10) NOT NULL DEFAULT '', |
|
|
2600 |
`letternumber` INT(1) NOT NULL DEFAULT 1, |
2600 |
`letternumber` INT(1) NOT NULL DEFAULT 1, |
2601 |
`message_transport_type` VARCHAR(20) NOT NULL DEFAULT 'email', |
2601 |
`message_transport_type` VARCHAR(20) NOT NULL DEFAULT 'email', |
2602 |
PRIMARY KEY (id), |
2602 |
PRIMARY KEY (id), |
2603 |
CONSTRAINT overduerules_fk FOREIGN KEY (branchcode, categorycode) REFERENCES overduerules (branchcode, categorycode) ON DELETE CASCADE ON UPDATE CASCADE, |
2603 |
CONSTRAINT overduerules_fk FOREIGN KEY (overduerules_id) REFERENCES overduerules (overduerules_id) ON DELETE CASCADE ON UPDATE CASCADE, |
2604 |
CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE |
2604 |
CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE |
2605 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2605 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2606 |
|
2606 |
|