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

(-)a/installer/data/mysql/atomicupdate/volumes.perl (+40 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if ( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
5
        ('EnableVolumes','0','','Enable volumes feature','YesNo');
6
    });
7
8
    unless ( TableExists('volumes') ) {
9
        $dbh->do(q{
10
            CREATE TABLE `volumes` ( -- information related to bibliographic records in Koha
11
            `id` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
12
            `biblionumber` INT(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
13
            `display_order` INT(4) NOT NULL default 0, -- specifies the 'sort order' for volumes
14
            `description` MEDIUMTEXT default NULL, -- equivilent to enumchron
15
            `created_on` TIMESTAMP NULL, -- Time and date the volume was created
16
            `updated_on` TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- Time and date of the latest change on the volume (description)
17
            PRIMARY KEY  (`id`),
18
            CONSTRAINT `volumes_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
19
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
20
        });
21
    }
22
23
    unless ( TableExists('volume_items') ) {
24
        $dbh->do(q{
25
            CREATE TABLE `volume_items` ( -- information related to bibliographic records in Koha
26
            `id` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
27
            `volume_id` int(11) NOT NULL default 0, -- foreign key making this table a 1 to 1 join from items to volumes
28
            `itemnumber` int(11) NOT NULL default 0, -- foreign key linking this table to the items table
29
            PRIMARY KEY  (`id`),
30
            UNIQUE KEY (volume_id,itemnumber),
31
            CONSTRAINT `volume_items_iifk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
32
            CONSTRAINT `volume_items_vifk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
33
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
34
        });
35
    }
36
37
    # Always end with this (adjust the bug info)
38
    SetVersion( $DBversion );
39
    print "Upgrade to $DBversion done (Bug XXXXX - Add ability to define volumes for items on a record)\n";
40
}
(-)a/installer/data/mysql/kohastructure.sql (+31 lines)
Lines 1752-1757 CREATE TABLE `patronimage` ( -- information related to patron images Link Here
1752
  CONSTRAINT `patronimage_fk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1752
  CONSTRAINT `patronimage_fk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1753
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1753
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1754
1754
1755
--
1756
-- Table structure for table `volumes`
1757
--
1758
1759
DROP TABLE IF EXISTS `volumes`;
1760
CREATE TABLE `volumes` ( -- information related to bibliographic records in Koha
1761
  `id` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
1762
  `biblionumber` INT(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
1763
  `display_order` INT(4) NOT NULL default 0, -- specifies the 'sort order' for volumes
1764
  `description` MEDIUMTEXT default NULL, -- equivilent to enumchron
1765
  `created_on` TIMESTAMP NULL, -- Time and date the volume was created
1766
  `updated_on` TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- Time and date of the latest change on the volume (description)
1767
  PRIMARY KEY  (`id`),
1768
  CONSTRAINT `volumes_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
1769
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1770
1771
--
1772
-- Table structure for table `volume_items`
1773
--
1774
1775
DROP TABLE IF EXISTS `volume_items`;
1776
CREATE TABLE `volume_items` ( -- information related to bibliographic records in Koha
1777
  `id` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
1778
  `volume_id` int(11) NOT NULL default 0, -- foreign key making this table a 1 to 1 join from items to volumes
1779
  `itemnumber` int(11) NOT NULL default 0, -- foreign key linking this table to the items table
1780
  PRIMARY KEY  (`id`),
1781
  UNIQUE KEY (volume_id,itemnumber),
1782
  CONSTRAINT `volume_items_iifk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1783
  CONSTRAINT `volume_items_vifk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1784
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1785
1755
--
1786
--
1756
-- Table structure for table `reserves`
1787
-- Table structure for table `reserves`
1757
--
1788
--
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 698-703 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
698
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
698
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
699
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
699
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
700
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
700
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
701
('EnableVolumes','0','','Enable volumes feature','YesNo'),
701
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
702
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
702
('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'),
703
('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'),
703
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
704
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +7 lines)
Lines 628-634 Circulation: Link Here
628
            - the last patron to return an item. This setting is independent of the opacreadinghistory and AnonymousPatron system preferences.
628
            - the last patron to return an item. This setting is independent of the opacreadinghistory and AnonymousPatron system preferences.
629
    Holds policy:
629
    Holds policy:
630
        -
630
        -
631
            - In the staff interface, split the holds queue into separate tables by
631
            - pref: EnableVolumes
632
              choices:
633
                  yes: Enable
634
                  no: "Don't enable"
635
            - volumes feature to allow collecting groups of items on a record into volumes.
636
        -
637
            - In the staff client, split the holds queue into separate tables by
632
            - pref: HoldsSplitQueue
638
            - pref: HoldsSplitQueue
633
              choices:
639
              choices:
634
                  nothing: nothing
640
                  nothing: nothing
635
- 

Return to bug 24857