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