KEY `name` (`category`),
KEY `lib` (`lib` (191)),
KEY `auth_value_idx` (`authorised_value`),
+ CONSTRAINT `av_uniq` UNIQUE (`category`,`authorised_value`),
CONSTRAINT `authorised_values_authorised_values_category` FOREIGN KEY (`category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
+-- Table structure for table desks
+--
+
+DROP TABLE IF EXISTS desks;
+CREATE TABLE desks ( -- desks available in a library
+ desk_id int(11) NOT NULL auto_increment, -- unique identifier
+ desk_name varchar(100) NOT NULL default '', -- name of the desk
+ branchcode varchar(10) NOT NULL, -- library the desk is located at
+ PRIMARY KEY (desk_id),
+ KEY `fk_desks_branchcode` (branchcode),
+ CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+--
-- Table structure for table `class_sort_rules`
--
`login_attempts` int(4) default 0, -- number of failed login attemps
`overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
`anonymized` TINYINT(1) NOT NULL DEFAULT 0, -- flag for data anonymization
+ `autorenew_checkouts` TINYINT(1) NOT NULL DEFAULT 1, -- flag for allowing auto-renewal
KEY borrowernumber (borrowernumber),
KEY `cardnumber` (`cardnumber`),
KEY `sms_provider_id` (`sms_provider_id`)
`withdrawn_on` datetime DEFAULT NULL, -- the date and time an item was last marked as withdrawn, NULL if not withdrawn
`itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o)
`coded_location_qualifier` varchar(10) default NULL, -- coded location qualifier(MARC21 952$f)
- `issues` smallint(6) default NULL, -- number of times this item has been checked out
+ `issues` smallint(6) default 0, -- number of times this item has been checked out
`renewals` smallint(6) default NULL, -- number of times this item has been renewed
`reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
`restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
`withdrawn_on` datetime DEFAULT NULL, -- the date and time an item was last marked as withdrawn, NULL if not withdrawn
`itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o)
`coded_location_qualifier` varchar(10) default NULL, -- coded location qualifier(MARC21 952$f)
- `issues` smallint(6) default NULL, -- number of times this item has been checked out/issued
+ `issues` smallint(6) default 0, -- number of times this item has been checked out/issued
`renewals` smallint(6) default NULL, -- number of times this item has been renewed
`reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
`restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
description LONGTEXT, -- a plain text explanation of the item type
rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
+ rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the daily retnal fee is calculated directly or using finesCalendar
rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
+ rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the hourly retnal fee is calculated directly or using finesCalendar
defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
`datearrived` datetime default NULL, -- the date the transfer arrived at its destination
`tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to
`comments` LONGTEXT, -- any comments related to the transfer
- `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding'), -- what triggered the transfer
+ `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve'), -- what triggered the transfer
PRIMARY KEY (`branchtransfer_id`),
KEY `frombranch` (`frombranch`),
KEY `tobranch` (`tobranch`),
`type` varchar(255) default NULL, -- always 1 for tabular
`notes` MEDIUMTEXT, -- the notes or description given to this report
`cache_expiry` int NOT NULL default 300,
- `public` boolean NOT NULL default FALSE,
+ `public` tinyint(1) NOT NULL default FALSE,
report_area varchar(6) default NULL,
report_group varchar(80) default NULL,
report_subgroup varchar(80) default NULL,
CREATE TABLE `search_marc_map` (
id int(11) NOT NULL AUTO_INCREMENT,
index_name ENUM('biblios','authorities') NOT NULL COMMENT 'what storage index this map is for',
- marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for',
+ marc_type ENUM('marc21', 'unimarc', 'normarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for',
marc_field VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field',
PRIMARY KEY(`id`),
UNIQUE key `index_name` (`index_name`, `marc_field` (191), `marc_type`),
search tinyint(1) NOT NULL DEFAULT 1,
search_marc_map_id int(11) NOT NULL,
search_field_id int(11) NOT NULL,
- facet boolean DEFAULT FALSE COMMENT 'true if a facet field should be generated for this',
- suggestible boolean DEFAULT FALSE COMMENT 'true if this field can be used to generate suggestions for browse',
- sort boolean DEFAULT NULL COMMENT 'true/false creates special sort handling, null doesn''t',
+ facet tinyint(1) DEFAULT FALSE COMMENT 'true if a facet field should be generated for this',
+ suggestible tinyint(1) DEFAULT FALSE COMMENT 'true if this field can be used to generate suggestions for browse',
+ sort tinyint(1) DEFAULT NULL COMMENT 'true/false creates special sort handling, null doesn''t',
PRIMARY KEY(search_marc_map_id, search_field_id),
FOREIGN KEY(search_marc_map_id) REFERENCES search_marc_map(id) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY(search_field_id) REFERENCES search_field(id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
--- Table structure for table `serial`
---
-
-DROP TABLE IF EXISTS `serial`;
-CREATE TABLE `serial` ( -- issues related to subscriptions
- `serialid` int(11) NOT NULL auto_increment, -- unique key for the issue
- `biblionumber` varchar(100) NOT NULL default '', -- foreign key for the biblio.biblionumber that this issue is attached to
- `subscriptionid` varchar(100) NOT NULL default '', -- foreign key to the subscription.subscriptionid that this issue is part of
- `serialseq` varchar(100) NOT NULL default '', -- issue information (volume, number, etc)
- `serialseq_x` varchar( 100 ) NULL DEFAULT NULL, -- first part of issue information
- `serialseq_y` varchar( 100 ) NULL DEFAULT NULL, -- second part of issue information
- `serialseq_z` varchar( 100 ) NULL DEFAULT NULL, -- third part of issue information
- `status` tinyint(4) NOT NULL default 0, -- status code for this issue (see manual for full descriptions)
- `planneddate` date default NULL, -- date expected
- `notes` MEDIUMTEXT, -- notes
- `publisheddate` date default NULL, -- date published
- publisheddatetext varchar(100) default NULL, -- date published (descriptive)
- `claimdate` date default NULL, -- date claimed
- claims_count int(11) default 0, -- number of claims made related to this issue
- `routingnotes` MEDIUMTEXT, -- notes from the routing list
- PRIMARY KEY (`serialid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-
---
-- Table structure for table `sessions`
--
`login_attempts` int(4) default 0, -- number of failed login attemps
`overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
`anonymized` TINYINT(1) NOT NULL DEFAULT 0, -- flag for data anonymization
+ `autorenew_checkouts` TINYINT(1) NOT NULL DEFAULT 1, -- flag for allowing auto-renewal
UNIQUE KEY `cardnumber` (`cardnumber`),
PRIMARY KEY `borrowernumber` (`borrowernumber`),
KEY `categorycode` (`categorycode`),
`returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues
`lastreneweddate` datetime default NULL, -- date the item was last renewed
`renewals` tinyint(4) NOT NULL default 0, -- lists the number of times the item was renewed
- `auto_renew` BOOLEAN default FALSE, -- automatic renewal
+ `auto_renew` tinyint(1) default FALSE, -- automatic renewal
`auto_renew_error` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- automatic renewal error
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
`issuedate` datetime default NULL, -- date the item was checked out or issued
`returndate` datetime default NULL, -- date the item was returned
`lastreneweddate` datetime default NULL, -- date the item was last renewed
`renewals` tinyint(4) NOT NULL default 0, -- lists the number of times the item was renewed
- `auto_renew` BOOLEAN default FALSE, -- automatic renewal
+ `auto_renew` tinyint(1) default FALSE, -- automatic renewal
`auto_renew_error` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- automatic renewal error
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
`issuedate` datetime default NULL, -- date the item was checked out or issued
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library
`expirationdate` DATE DEFAULT NULL, -- the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
`lowestPriority` tinyint(1) NOT NULL DEFAULT 0,
- `suspend` BOOLEAN NOT NULL DEFAULT 0,
+ `suspend` tinyint(1) NOT NULL DEFAULT 0,
`suspend_until` DATETIME NULL DEFAULT NULL,
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting
- `item_level_hold` BOOLEAN NOT NULL DEFAULT 0, -- Is the hpld placed at item level
+ `item_level_hold` tinyint(1) NOT NULL DEFAULT 0, -- Is the hpld placed at item level
PRIMARY KEY (`reserve_id`),
KEY priorityfoundidx (priority,found),
KEY `borrowernumber` (`borrowernumber`),
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library
`expirationdate` DATE DEFAULT NULL, -- the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
`lowestPriority` tinyint(1) NOT NULL DEFAULT 0, -- has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)
- `suspend` BOOLEAN NOT NULL DEFAULT 0, -- in this hold suspended (1 for yes, 0 for no)
+ `suspend` tinyint(1) NOT NULL DEFAULT 0, -- in this hold suspended (1 for yes, 0 for no)
`suspend_until` DATETIME NULL DEFAULT NULL, -- the date this hold is suspended until (NULL for infinitely)
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting
- `item_level_hold` BOOLEAN NOT NULL DEFAULT 0, -- Is the hpld placed at item level
+ `item_level_hold` tinyint(1) NOT NULL DEFAULT 0, -- Is the hpld placed at item level
PRIMARY KEY (`reserve_id`),
KEY `old_reserves_borrowernumber` (`borrowernumber`),
KEY `old_reserves_biblionumber` (`biblionumber`),
DROP TABLE IF EXISTS `subscription`;
CREATE TABLE `subscription` ( -- information related to the subscription
- `biblionumber` int(11) NOT NULL default 0, -- foreign key for biblio.biblionumber that this subscription is attached to
+ `biblionumber` int(11) NOT NULL, -- foreign key for biblio.biblionumber that this subscription is attached to
`subscriptionid` int(11) NOT NULL auto_increment, -- unique key for this subscription
`librarian` varchar(100) default '', -- the librarian's username from borrowers.userid
`startdate` date default NULL, -- start date for this subscription
`firstacquidate` date default NULL, -- first issue received date
`manualhistory` tinyint(1) NOT NULL default 0, -- yes or no to managing the history manually
`irregularity` MEDIUMTEXT, -- any irregularities in the subscription
- skip_serialseq BOOLEAN NOT NULL DEFAULT 0,
+ skip_serialseq tinyint(1) NOT NULL DEFAULT 0,
`letter` varchar(20) default NULL,
`numberpattern` integer default null, -- the numbering pattern used links to subscription_numberpatterns.id
locale VARCHAR(80) DEFAULT NULL, -- for foreign language subscriptions to display months, seasons, etc correctly
`opacdisplaycount` VARCHAR(10) NULL, -- how many issues to show to the public
`graceperiod` int(11) NOT NULL default '0', -- grace period in days
`enddate` date default NULL, -- subscription end date
- `closed` INT(1) NOT NULL DEFAULT 0, -- yes / no if the subscription is closed
+ `closed` TINYINT(1) NOT NULL DEFAULT 0, -- yes / no if the subscription is closed
`reneweddate` date default NULL, -- date of last renewal for the subscription
`itemtype` VARCHAR( 10 ) NULL,
`previousitemtype` VARCHAR( 10 ) NULL,
`mana_id` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`subscriptionid`),
- KEY `by_biblionumber` (`biblionumber`),
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE
+ CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT subscription_ibfk_3 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+--
+-- Table structure for table `serial`
+--
+
+DROP TABLE IF EXISTS `serial`;
+CREATE TABLE `serial` ( -- issues related to subscriptions
+ `serialid` int(11) NOT NULL auto_increment, -- unique key for the issue
+ `biblionumber` int(11) NOT NULL, -- foreign key for the biblio.biblionumber that this issue is attached to
+ `subscriptionid` int(11) NOT NULL, -- foreign key to the subscription.subscriptionid that this issue is part of
+ `serialseq` varchar(100) NOT NULL default '', -- issue information (volume, number, etc)
+ `serialseq_x` varchar( 100 ) NULL DEFAULT NULL, -- first part of issue information
+ `serialseq_y` varchar( 100 ) NULL DEFAULT NULL, -- second part of issue information
+ `serialseq_z` varchar( 100 ) NULL DEFAULT NULL, -- third part of issue information
+ `status` tinyint(4) NOT NULL default 0, -- status code for this issue (see manual for full descriptions)
+ `planneddate` date default NULL, -- date expected
+ `notes` MEDIUMTEXT, -- notes
+ `publisheddate` date default NULL, -- date published
+ publisheddatetext varchar(100) default NULL, -- date published (descriptive)
+ `claimdate` date default NULL, -- date claimed
+ claims_count int(11) default 0, -- number of claims made related to this issue
+ `routingnotes` MEDIUMTEXT, -- notes from the routing list
+ PRIMARY KEY (`serialid`),
+ CONSTRAINT serial_ibfk_1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT serial_ibfk_2 FOREIGN KEY (subscriptionid) REFERENCES subscription (subscriptionid) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
DROP TABLE IF EXISTS `subscriptionhistory`;
CREATE TABLE `subscriptionhistory` (
- `biblionumber` int(11) NOT NULL default 0,
- `subscriptionid` int(11) NOT NULL default 0,
+ `biblionumber` int(11) NOT NULL,
+ `subscriptionid` int(11) NOT NULL,
`histstartdate` date default NULL,
`histenddate` date default NULL,
`missinglist` LONGTEXT NOT NULL,
`opacnote` LONGTEXT NULL,
`librariannote` LONGTEXT NULL,
PRIMARY KEY (`subscriptionid`),
- KEY `biblionumber` (`biblionumber`)
+ CONSTRAINT subscription_history_ibfk_1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT subscription_history_ibfk_2 FOREIGN KEY (subscriptionid) REFERENCES subscription (subscriptionid) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
`address3` LONGTEXT, -- third line of vendor physical address
`address4` LONGTEXT, -- fourth line of vendor physical address
`phone` varchar(30) default NULL, -- vendor phone number
- `accountnumber` LONGTEXT, -- unused in Koha
- `othersupplier` LONGTEXT, -- unused in Koha
- `currency` varchar(10) NOT NULL default '', -- unused in Koha
- `booksellerfax` LONGTEXT, -- vendor fax number
+ `accountnumber` LONGTEXT, -- vendor account number
`notes` LONGTEXT, -- order notes
- `bookselleremail` LONGTEXT, -- vendor email
- `booksellerurl` LONGTEXT, -- unused in Koha
`postal` LONGTEXT, -- vendor postal address (all lines)
`url` varchar(255) default NULL, -- vendor web address
`active` tinyint(4) default NULL, -- is this vendor active (1 for yes, 0 for no)
fax varchar(100) default NULL, -- contact's fax number
email varchar(100) default NULL, -- contact's email address
notes LONGTEXT, -- notes related to the contact
- orderacquisition BOOLEAN NOT NULL DEFAULT 0, -- should this contact receive acquisition orders
- claimacquisition BOOLEAN NOT NULL DEFAULT 0, -- should this contact receive acquisitions claims
- claimissues BOOLEAN NOT NULL DEFAULT 0, -- should this contact receive serial claims
- acqprimary BOOLEAN NOT NULL DEFAULT 0, -- is this the primary contact for acquisitions messages
- serialsprimary BOOLEAN NOT NULL DEFAULT 0, -- is this the primary contact for serials messages
+ orderacquisition tinyint(1) NOT NULL DEFAULT 0, -- should this contact receive acquisition orders
+ claimacquisition tinyint(1) NOT NULL DEFAULT 0, -- should this contact receive acquisitions claims
+ claimissues tinyint(1) NOT NULL DEFAULT 0, -- should this contact receive serial claims
+ acqprimary tinyint(1) NOT NULL DEFAULT 0, -- is this the primary contact for acquisitions messages
+ serialsprimary tinyint(1) NOT NULL DEFAULT 0, -- is this the primary contact for serials messages
booksellerid int(11) not NULL,
PRIMARY KEY (id),
CONSTRAINT booksellerid_aqcontacts_fk FOREIGN KEY (booksellerid)
accepteddate date default NULL, -- date the suggestion was marked as accepted
rejectedby INT(11) default NULL, -- borrowernumber for the librarian who rejected the suggestion, foreign key linking to the borrowers table
rejecteddate date default NULL, -- date the suggestion was marked as rejected
+ lastmodificationby INT(11) default NULL, -- borrowernumber for the librarian who edit the suggestion for the last time
+ lastmodificationdate date default NULL, -- date of the last modification
`STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED)
+ `archived` TINYINT(1) NOT NULL DEFAULT 0, -- is the suggestion archived?
`note` LONGTEXT, -- note entered on the suggestion
`author` varchar(80) default NULL, -- author of the suggested item
`title` varchar(255) default NULL, -- title of the suggested item
CONSTRAINT `suggestions_ibfk_managedby` FOREIGN KEY (`managedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `suggestions_ibfk_acceptedby` FOREIGN KEY (`acceptedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `suggestions_ibfk_rejectedby` FOREIGN KEY (`rejectedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT `suggestions_ibfk_lastmodificationby` FOREIGN KEY (`lastmodificationby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `suggestions_ibfk_biblionumber` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `suggestions_ibfk_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE
basketno INT(11) REFERENCES aqbasket( basketno),
raw_msg LONGTEXT,
filename MEDIUMTEXT,
- deleted BOOLEAN NOT NULL DEFAULT 0,
+ deleted tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (id),
KEY vendorid ( vendor_id),
KEY ediacct (edi_acct),
CREATE TABLE IF NOT EXISTS `borrower_modifications` (
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`verification_token` varchar(255) NOT NULL DEFAULT '',
- `changed_fields` MEDIUMTEXT NOT NULL,
+ `changed_fields` MEDIUMTEXT DEFAULT NULL,
`borrowernumber` int(11) NOT NULL DEFAULT '0',
`cardnumber` varchar(32) DEFAULT NULL,
`surname` LONGTEXT,
`ci_id` int(11) NOT NULL AUTO_INCREMENT, -- course item id
`itemnumber` int(11) NOT NULL, -- items.itemnumber for the item on reserve
`itype` varchar(10) DEFAULT NULL, -- new itemtype for the item to have while on reserve (optional)
+ `itype_enabled` tinyint(1) NOT NULL DEFAULT 0, -- indicates if itype should be changed while on course reserve
+ `itype_storage` varchar(10) DEFAULT NULL, -- a place to store the itype when item is on course reserve
`ccode` varchar(80) DEFAULT NULL, -- new category code for the item to have while on reserve (optional)
+ `ccode_enabled` tinyint(1) NOT NULL DEFAULT 0, -- indicates if ccode should be changed while on course reserve
+ `ccode_storage` varchar(80) DEFAULT NULL, -- a place to store the ccode when item is on course reserve
`holdingbranch` varchar(10) DEFAULT NULL, -- new holding branch for the item to have while on reserve (optional)
+ `holdingbranch_enabled` tinyint(1) NOT NULL DEFAULT 0, -- indicates if itype should be changed while on course reserve
+ `holdingbranch_storage` varchar(10) DEFAULT NULL, -- a place to store the holdingbranch when item is on course reserve
`location` varchar(80) DEFAULT NULL, -- new shelving location for the item to have while on reseve (optional)
+ `location_enabled` tinyint(1) NOT NULL DEFAULT 0, -- indicates if itype should be changed while on course reserve
+ `location_storage` varchar(80) DEFAULT NULL, -- a place to store the location when the item is on course reserve
`enabled` enum('yes','no') NOT NULL DEFAULT 'no', -- if at least one enabled course has this item on reseve, this field will be 'yes', otherwise it will be 'no'
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ci_id`),
CONSTRAINT `rc_resolved_by_ibfk` FOREIGN KEY (`resolved_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+--
+-- Table structure for table `problem_reports`
+--
+
+DROP TABLE IF EXISTS `problem_reports`;
+CREATE TABLE `problem_reports` (
+ `reportid` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
+ `title` varchar(40) NOT NULL default '', -- report subject line
+ `content` varchar(255) NOT NULL default '', -- report message content
+ `borrowernumber` int(11) NOT NULL default 0, -- the user who created the problem report
+ `branchcode` varchar(10) NOT NULL default '', -- borrower's branch
+ `username` varchar(75) default NULL, -- OPAC username
+ `problempage` TEXT default NULL, -- page the user triggered the problem report form from
+ `recipient` enum('admin','library') NOT NULL default 'library', -- the 'to-address' of the problem report
+ `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- timestamp of report submission
+ `status` varchar(6) NOT NULL default 'New', -- status of the report. New, Viewed, Closed
+ PRIMARY KEY (`reportid`),
+ CONSTRAINT `problem_reports_ibfk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `problem_reports_ibfk2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;