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

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

Return to bug 18928