Bug 10703: Document borrower_files table
authorNicole C. Engard <nengard@bywatersolutions.com>
Thu, 8 Aug 2013 13:01:23 +0000 (09:01 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 16 Aug 2013 14:41:15 +0000 (14:41 +0000)
Add db documentation to borrower_files table.

To test:

apply
review kohastructure.sql to be sure documentation is there

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No errors. Tested loading on new database.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

installer/data/mysql/kohastructure.sql

index a13a4b2..7628983 100644 (file)
@@ -2523,14 +2523,14 @@ CREATE TABLE `message_transports` (
 --
 
 DROP TABLE IF EXISTS `borrower_files`;
-CREATE TABLE IF NOT EXISTS `borrower_files` (
-  `file_id` int(11) NOT NULL AUTO_INCREMENT,
-  `borrowernumber` int(11) NOT NULL,
-  `file_name` varchar(255) NOT NULL,
-  `file_type` varchar(255) NOT NULL,
-  `file_description` varchar(255) DEFAULT NULL,
-  `file_content` longblob NOT NULL,
-  `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+CREATE TABLE IF NOT EXISTS `borrower_files` ( -- files attached to the patron/borrower record
+  `file_id` int(11) NOT NULL AUTO_INCREMENT, -- unique key
+  `borrowernumber` int(11) NOT NULL, -- foreign key linking to the patron via the borrowernumber
+  `file_name` varchar(255) NOT NULL, -- file name
+  `file_type` varchar(255) NOT NULL, -- type of file
+  `file_description` varchar(255) DEFAULT NULL, -- description given to the file
+  `file_content` longblob NOT NULL, -- the file
+  `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- date and time the file was added
   PRIMARY KEY (`file_id`),
   KEY `borrowernumber` (`borrowernumber`),
   CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE