|
Lines 36-52
CREATE TABLE IF NOT EXISTS `housebound_visit` (
Link Here
|
| 36 |
ON UPDATE CASCADE ON DELETE CASCADE |
36 |
ON UPDATE CASCADE ON DELETE CASCADE |
| 37 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
37 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 38 |
|
38 |
|
|
|
39 |
CREATE TABLE IF NOT EXISTS `housebound_role` ( |
| 40 |
`borrowernumber_id` int(11) NOT NULL, -- borrowernumber link |
| 41 |
`housebound_chooser` tinyint(1) NOT NULL DEFAULT 0, -- set to 1 to indicate this patron is a housebound chooser volunteer |
| 42 |
`housebound_deliverer` tinyint(1) NOT NULL DEFAULT 0, -- set to 1 to indicate this patron is a housebound deliverer volunteer |
| 43 |
PRIMARY KEY (`borrowernumber_id`), |
| 44 |
CONSTRAINT `houseboundrole_bnfk` |
| 45 |
FOREIGN KEY (`borrowernumber_id`) |
| 46 |
REFERENCES `borrowers` (`borrowernumber`) |
| 47 |
ON UPDATE CASCADE ON DELETE CASCADE |
| 48 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 49 |
|
| 39 |
INSERT IGNORE INTO systempreferences |
50 |
INSERT IGNORE INTO systempreferences |
| 40 |
(variable,value,options,explanation,type) VALUES |
51 |
(variable,value,options,explanation,type) VALUES |
| 41 |
('HouseboundModule',0,'', |
52 |
('HouseboundModule',0,'', |
| 42 |
'If ON, enable housebound module functionality.','YesNo'); |
53 |
'If ON, enable housebound module functionality.','YesNo'); |
| 43 |
|
54 |
|
| 44 |
INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES |
55 |
INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES |
| 45 |
('HSBND_FREQ','EW','Every week'), |
56 |
('HSBND_FREQ','EW','Every week'); |
| 46 |
('HSBND_ROLE','CHO','Chooser'), |
|
|
| 47 |
('HSBND_ROLE','DEL','Deliverer'); |
| 48 |
|
| 49 |
INSERT IGNORE INTO borrower_attribute_types |
| 50 |
(code, description, repeatable, opac_display, staff_searchable, |
| 51 |
authorised_value_category, display_checkout) values |
| 52 |
('HSBND', 'Housebound role', 1, 1, 1, 'HSBND_ROLE', 1); |