Lines 1705-1710
CREATE TABLE `opac_news` ( -- data from the news tool
Link Here
|
1705 |
|
1705 |
|
1706 |
DROP TABLE IF EXISTS `overduerules`; |
1706 |
DROP TABLE IF EXISTS `overduerules`; |
1707 |
CREATE TABLE `overduerules` ( -- overdue notice status and triggers |
1707 |
CREATE TABLE `overduerules` ( -- overdue notice status and triggers |
|
|
1708 |
`overduerules_id` mediumint NOT NULL AUTO_INCREMENT, -- unique identifier for the overduerules |
1708 |
`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) |
1709 |
`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) |
1709 |
`categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for |
1710 |
`categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for |
1710 |
`delay1` int(4) default NULL, -- number of days after the item is overdue that the first notice is sent |
1711 |
`delay1` int(4) default NULL, -- number of days after the item is overdue that the first notice is sent |
Lines 1716-1722
CREATE TABLE `overduerules` ( -- overdue notice status and triggers
Link Here
|
1716 |
`delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent |
1717 |
`delay3` int(4) default NULL, -- number of days after the item is overdue that the third notice is sent |
1717 |
`letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice |
1718 |
`letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice |
1718 |
`debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
1719 |
`debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
1719 |
PRIMARY KEY (`branchcode`,`categorycode`) |
1720 |
PRIMARY KEY (`overduerules_id`) |
1720 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1721 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1721 |
|
1722 |
|
1722 |
-- |
1723 |
-- |
Lines 2591-2602
CREATE TABLE `message_transport_types` (
Link Here
|
2591 |
DROP TABLE IF EXISTS `overduerules_transport_types`; |
2592 |
DROP TABLE IF EXISTS `overduerules_transport_types`; |
2592 |
CREATE TABLE overduerules_transport_types( |
2593 |
CREATE TABLE overduerules_transport_types( |
2593 |
`id` INT(11) NOT NULL AUTO_INCREMENT, |
2594 |
`id` INT(11) NOT NULL AUTO_INCREMENT, |
2594 |
`branchcode` varchar(10) NOT NULL DEFAULT '', |
|
|
2595 |
`categorycode` VARCHAR(10) NOT NULL DEFAULT '', |
2596 |
`letternumber` INT(1) NOT NULL DEFAULT 1, |
2597 |
`message_transport_type` VARCHAR(20) NOT NULL DEFAULT 'email', |
2595 |
`message_transport_type` VARCHAR(20) NOT NULL DEFAULT 'email', |
|
|
2596 |
`overduerules_id` mediumint NOT NULL, |
2598 |
PRIMARY KEY (id), |
2597 |
PRIMARY KEY (id), |
2599 |
CONSTRAINT overduerules_fk FOREIGN KEY (branchcode, categorycode) REFERENCES overduerules (branchcode, categorycode) ON DELETE CASCADE ON UPDATE CASCADE, |
2598 |
CONSTRAINT overduerules_fk FOREIGN KEY (overduerules_id) REFERENCES overduerules (overduerules_id) ON DELETE CASCADE ON UPDATE CASCADE, |
2600 |
CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE |
2599 |
CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE |
2601 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2600 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2602 |
|
2601 |
|