View | Details | Raw Unified | Return to bug 18928
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-63 lines)
Lines 352-385 CREATE TABLE collections_tracking ( Link Here
352
  PRIMARY KEY (collections_tracking_id)
352
  PRIMARY KEY (collections_tracking_id)
353
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
353
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
354
354
355
--
356
-- Table structure for table `default_branch_circ_rules`
357
--
358
359
DROP TABLE IF EXISTS `default_branch_circ_rules`;
360
CREATE TABLE `default_branch_circ_rules` (
361
  `branchcode` VARCHAR(10) NOT NULL,
362
  `holdallowed` tinyint(1) default NULL,
363
  hold_fulfillment_policy ENUM('any', 'homebranch', 'holdingbranch') NOT NULL DEFAULT 'any', -- limit trapping of holds by branchcode
364
  `returnbranch` varchar(15) default NULL,
365
  PRIMARY KEY (`branchcode`),
366
  CONSTRAINT `default_branch_circ_rules_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
367
    ON DELETE CASCADE ON UPDATE CASCADE
368
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
369
370
--
371
-- Table structure for table `default_circ_rules`
372
--
373
374
DROP TABLE IF EXISTS `default_circ_rules`;
375
CREATE TABLE `default_circ_rules` (
376
    `singleton` enum('singleton') NOT NULL default 'singleton',
377
    `holdallowed` int(1) default NULL,
378
    hold_fulfillment_policy ENUM('any', 'homebranch', 'holdingbranch') NOT NULL DEFAULT 'any', -- limit trapping of holds by branchcode
379
    `returnbranch` varchar(15) default NULL,
380
    PRIMARY KEY (`singleton`)
381
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
382
383
--
355
--
384
-- Table structure for table `cities`
356
-- Table structure for table `cities`
385
--
357
--
Lines 965-985 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
965
  UNIQUE KEY `itemtype` (`itemtype`)
937
  UNIQUE KEY `itemtype` (`itemtype`)
966
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
938
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
967
939
968
--
969
-- Table structure for table `default_branch_item_rules`
970
--
971
972
DROP TABLE IF EXISTS `default_branch_item_rules`;
973
CREATE TABLE `default_branch_item_rules` (
974
  `itemtype` varchar(10) NOT NULL,
975
  `holdallowed` tinyint(1) default NULL,
976
  hold_fulfillment_policy ENUM('any', 'homebranch', 'holdingbranch') NOT NULL DEFAULT 'any', -- limit trapping of holds by branchcode
977
  `returnbranch` varchar(15) default NULL,
978
  PRIMARY KEY  (`itemtype`),
979
  CONSTRAINT `default_branch_item_rules_ibfk_1` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
980
    ON DELETE CASCADE ON UPDATE CASCADE
981
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
982
983
--
940
--
984
-- Table structure for table `branchtransfers`
941
-- Table structure for table `branchtransfers`
985
--
942
--
Lines 1002-1026 CREATE TABLE `branchtransfers` ( -- information for items that are in transit be Link Here
1002
  CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
959
  CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
1003
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
960
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1004
961
1005
--
1006
-- Table structure for table `branch_item_rules`
1007
--
1008
1009
DROP TABLE IF EXISTS `branch_item_rules`;
1010
CREATE TABLE `branch_item_rules` ( -- information entered in the circulation and fine rules under 'Holds policy by item type'
1011
  `branchcode` varchar(10) NOT NULL, -- the branch this rule is for (branches.branchcode)
1012
  `itemtype` varchar(10) NOT NULL, -- the item type this rule applies to (items.itype)
1013
  `holdallowed` tinyint(1) default NULL, -- the number of holds allowed
1014
  hold_fulfillment_policy ENUM('any', 'homebranch', 'holdingbranch') NOT NULL DEFAULT 'any', -- limit trapping of holds by branchcode
1015
  `returnbranch` varchar(15) default NULL, -- the branch the item returns to (homebranch, holdingbranch, noreturn)
1016
  PRIMARY KEY  (`itemtype`,`branchcode`),
1017
  KEY `branch_item_rules_ibfk_2` (`branchcode`),
1018
  CONSTRAINT `branch_item_rules_ibfk_1` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
1019
    ON DELETE CASCADE ON UPDATE CASCADE,
1020
  CONSTRAINT `branch_item_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
1021
    ON DELETE CASCADE ON UPDATE CASCADE
1022
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1023
1024
--
962
--
1025
-- Table structure for table `creator_images`
963
-- Table structure for table `creator_images`
1026
--
964
--
1027
- 

Return to bug 18928