Lines 1698-1703
CREATE TABLE `opac_news` ( -- data from the news tool
Link Here
|
1698 |
|
1698 |
|
1699 |
DROP TABLE IF EXISTS `overduerules`; |
1699 |
DROP TABLE IF EXISTS `overduerules`; |
1700 |
CREATE TABLE `overduerules` ( -- overdue notice status and triggers |
1700 |
CREATE TABLE `overduerules` ( -- overdue notice status and triggers |
|
|
1701 |
`overduerules_id` mediumint NOT NULL AUTO_INCREMENT, -- unique identifier for the overduerules |
1701 |
`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) |
1702 |
`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) |
1702 |
`categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for |
1703 |
`categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for |
1703 |
`delay1` int(4) default NULL, -- number of days after the item is overdue that the first notice is sent |
1704 |
`delay1` int(4) default NULL, -- number of days after the item is overdue that the first notice is sent |
Lines 1709-1715
CREATE TABLE `overduerules` ( -- overdue notice status and triggers
Link Here
|
1709 |
`delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent |
1710 |
`delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent |
1710 |
`letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice |
1711 |
`letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice |
1711 |
`debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
1712 |
`debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
1712 |
PRIMARY KEY (`branchcode`,`categorycode`) |
1713 |
PRIMARY KEY (`overduerules_id`) |
1713 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1714 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1714 |
|
1715 |
|
1715 |
-- |
1716 |
-- |
Lines 2580-2591
CREATE TABLE `message_transport_types` (
Link Here
|
2580 |
DROP TABLE IF EXISTS `overduerules_transport_types`; |
2581 |
DROP TABLE IF EXISTS `overduerules_transport_types`; |
2581 |
CREATE TABLE overduerules_transport_types( |
2582 |
CREATE TABLE overduerules_transport_types( |
2582 |
`id` INT(11) NOT NULL AUTO_INCREMENT, |
2583 |
`id` INT(11) NOT NULL AUTO_INCREMENT, |
2583 |
`branchcode` varchar(10) NOT NULL DEFAULT '', |
|
|
2584 |
`categorycode` VARCHAR(10) NOT NULL DEFAULT '', |
2585 |
`letternumber` INT(1) NOT NULL DEFAULT 1, |
2586 |
`message_transport_type` VARCHAR(20) NOT NULL DEFAULT 'email', |
2584 |
`message_transport_type` VARCHAR(20) NOT NULL DEFAULT 'email', |
|
|
2585 |
`overduerules_id` mediumint NOT NULL, |
2587 |
PRIMARY KEY (id), |
2586 |
PRIMARY KEY (id), |
2588 |
CONSTRAINT overduerules_fk FOREIGN KEY (branchcode, categorycode) REFERENCES overduerules (branchcode, categorycode) ON DELETE CASCADE ON UPDATE CASCADE, |
2587 |
CONSTRAINT overduerules_fk FOREIGN KEY (overduerules_id) REFERENCES overduerules (overduerules_id) ON DELETE CASCADE ON UPDATE CASCADE, |
2589 |
CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE |
2588 |
CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE |
2590 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2589 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2591 |
|
2590 |
|