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 1807-1812 CREATE TABLE `club_fields` ( Link Here
1807
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1807
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1808
/*!40101 SET character_set_client = @saved_cs_client */;
1808
/*!40101 SET character_set_client = @saved_cs_client */;
1809
1809
1810
--
1811
-- Table structure for table `volumes`
1812
--
1813
1814
DROP TABLE IF EXISTS `volumes`;
1815
CREATE TABLE `volumes` ( -- information related to bibliographic records in Koha
1816
  `id` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
1817
  `biblionumber` INT(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
1818
  `display_order` INT(4) NOT NULL default 0, -- specifies the 'sort order' for volumes
1819
  `description` MEDIUMTEXT default NULL, -- equivilent to enumchron
1820
  `created_on` TIMESTAMP NULL, -- Time and date the volume was created
1821
  `updated_on` TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- Time and date of the latest change on the volume (description)
1822
  PRIMARY KEY  (`id`),
1823
  CONSTRAINT `volumes_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
1824
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1825
1826
--
1827
-- Table structure for table `volume_items`
1828
--
1829
1830
DROP TABLE IF EXISTS `volume_items`;
1831
CREATE TABLE `volume_items` ( -- information related to bibliographic records in Koha
1832
  `id` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
1833
  `volume_id` int(11) NOT NULL default 0, -- foreign key making this table a 1 to 1 join from items to volumes
1834
  `itemnumber` int(11) NOT NULL default 0, -- foreign key linking this table to the items table
1835
  PRIMARY KEY  (`id`),
1836
  UNIQUE KEY (volume_id,itemnumber),
1837
  CONSTRAINT `volume_items_iifk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1838
  CONSTRAINT `volume_items_vifk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1839
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1840
1810
--
1841
--
1811
-- Table structure for table `club_holds`
1842
-- Table structure for table `club_holds`
1812
--
1843
--
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 721-726 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
721
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
721
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
722
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
722
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
723
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
723
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
724
('EnableVolumes','0','','Enable volumes feature','YesNo'),
724
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
725
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
725
('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'),
726
('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'),
726
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
727
('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 660-666 Circulation: Link Here
660
            - 'the last patron to return an item. This setting is independent of the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacreadinghistory">opacreadinghistory</a> and <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AnonymousPatron">AnonymousPatron</a> system preferences.'
660
            - 'the last patron to return an item. This setting is independent of the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacreadinghistory">opacreadinghistory</a> and <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AnonymousPatron">AnonymousPatron</a> system preferences.'
661
    Holds policy:
661
    Holds policy:
662
        -
662
        -
663
            - In the staff interface, split the holds queue into separate tables by
663
            - pref: EnableVolumes
664
              choices:
665
                  yes: Enable
666
                  no: "Don't enable"
667
            - volumes feature to allow collecting groups of items on a record into volumes.
668
        -
669
            - In the staff client, split the holds queue into separate tables by
664
            - pref: HoldsSplitQueue
670
            - pref: HoldsSplitQueue
665
              choices:
671
              choices:
666
                  nothing: nothing
672
                  nothing: nothing
667
- 

Return to bug 24857