[Koha-patches] [PATCH] Bug 6716 - Document holiday tables

Nicole C. Engard nengard at bywatersolutions.com
Sat Aug 27 07:09:15 CEST 2011


This patch documents the special_holidays and repeatable_holidays
tables.
---
 installer/data/mysql/kohastructure.sql |   34 ++++++++++++++++----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
index 13fa53d..171b6d0 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -1493,14 +1493,14 @@ CREATE TABLE `printers_profile` (
 --
 
 DROP TABLE IF EXISTS `repeatable_holidays`;
-CREATE TABLE `repeatable_holidays` (
-  `id` int(11) NOT NULL auto_increment,
-  `branchcode` varchar(10) NOT NULL default '',
-  `weekday` smallint(6) default NULL,
-  `day` smallint(6) default NULL,
-  `month` smallint(6) default NULL,
-  `title` varchar(50) NOT NULL default '',
-  `description` text NOT NULL,
+CREATE TABLE `repeatable_holidays` ( -- information for the days the library is closed
+  `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
+  `branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table, defines which branch this closing is for
+  `weekday` smallint(6) default NULL, -- day of the week (0=Sunday, 1=Monday, etc) this closing is repeated on
+  `day` smallint(6) default NULL, -- day of the month this closing is on
+  `month` smallint(6) default NULL, -- month this closing is in
+  `title` varchar(50) NOT NULL default '', -- title of this closing
+  `description` text NOT NULL, -- description for this closing
   PRIMARY KEY  (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
@@ -1679,15 +1679,15 @@ CREATE TABLE sessions (
 --
 
 DROP TABLE IF EXISTS `special_holidays`;
-CREATE TABLE `special_holidays` (
-  `id` int(11) NOT NULL auto_increment,
-  `branchcode` varchar(10) NOT NULL default '',
-  `day` smallint(6) NOT NULL default 0,
-  `month` smallint(6) NOT NULL default 0,
-  `year` smallint(6) NOT NULL default 0,
-  `isexception` smallint(1) NOT NULL default 1,
-  `title` varchar(50) NOT NULL default '',
-  `description` text NOT NULL,
+CREATE TABLE `special_holidays` ( -- non repeatable holidays/library closings
+  `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
+  `branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table, defines which branch this closing is for
+  `day` smallint(6) NOT NULL default 0, -- day of the month this closing is on
+  `month` smallint(6) NOT NULL default 0, -- month this closing is in
+  `year` smallint(6) NOT NULL default 0, -- year this closing is in
+  `isexception` smallint(1) NOT NULL default 1, -- is this a holiday exception to a repeatable holiday (1 for yes, 0 for no)
+  `title` varchar(50) NOT NULL default '', -- title for this closing
+  `description` text NOT NULL, -- description of this closing
   PRIMARY KEY  (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
-- 
1.7.2.3



More information about the Koha-patches mailing list