From bf3dab47f018efe0a2e8a8b0097e4e98d7608eed Mon Sep 17 00:00:00 2001 From: Nicole Date: Thu, 5 Mar 2015 06:15:56 -0800 Subject: [PATCH] Bug 10703: Update Patron DB Documentation Update patron categories and patron restrictions DB docs. To test: * Review database documentation for categories * Review database documentation for patron_debarments Signed-off-by: Brendan Gallagher Signed-off-by: Jonathan Druart --- installer/data/mysql/kohastructure.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e30ae7b..daa7f20 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -322,15 +322,15 @@ CREATE TABLE `borrower_attributes` ( -- values of custom patron fields known as -- DROP TABLE IF EXISTS `borrower_debarments`; -CREATE TABLE borrower_debarments ( - borrower_debarment_id int(11) NOT NULL AUTO_INCREMENT, - borrowernumber int(11) NOT NULL, - expiration date DEFAULT NULL, - `type` enum('SUSPENSION','OVERDUES','MANUAL') NOT NULL DEFAULT 'MANUAL', - `comment` text, - manager_id int(11) DEFAULT NULL, - created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - updated timestamp NULL DEFAULT NULL, +CREATE TABLE borrower_debarments ( -- tracks restrictions on the patron's record + borrower_debarment_id int(11) NOT NULL AUTO_INCREMENT, -- unique key for the restriction + borrowernumber int(11) NOT NULL, -- foreign key for borrowers.borrowernumber for patron who is restricted + expiration date DEFAULT NULL, -- expiration date of the restriction + `type` enum('SUSPENSION','OVERDUES','MANUAL') NOT NULL DEFAULT 'MANUAL', -- type of restriction + `comment` text, -- comments about the restriction + manager_id int(11) DEFAULT NULL, -- foreign key for borrowers.borrowernumber for the librarian managing the restriction + created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- date the restriction was added + updated timestamp NULL DEFAULT NULL, -- date the restriction was updated PRIMARY KEY (borrower_debarment_id), KEY borrowernumber (borrowernumber), CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) @@ -477,7 +477,7 @@ CREATE TABLE `categories` ( -- this table shows information related to Koha patr `enrolmentperiod` smallint(6) default NULL, -- number of months the patron is enrolled for (will be NULL if enrolmentperioddate is set) `enrolmentperioddate` DATE NULL DEFAULT NULL, -- date the patron is enrolled until (will be NULL if enrolmentperiod is set) `upperagelimit` smallint(6) default NULL, -- age limit for the patron - `dateofbirthrequired` tinyint(1) default NULL, + `dateofbirthrequired` tinyint(1) default NULL, -- the minimum age required for the patron category `finetype` varchar(30) default NULL, -- unused in Koha `bulk` tinyint(1) default NULL, `enrolmentfee` decimal(28,6) default NULL, -- enrollment fee for the patron -- 2.1.0