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

(-)a/installer/data/mysql/atomicupdate/bug_38290-add_library_group_filtering.pl (+31 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
3
4
return {
5
    bug_number  => "38290",
6
    description => "Add library group filtering",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        unless ( column_exists( 'aqbooksellers', 'lib_group_visibility' ) ) {
12
            $dbh->do(
13
                q{
14
                    ALTER TABLE aqbooksellers
15
                        ADD COLUMN `lib_group_visibility` varchar(255) NULL DEFAULT NULL
16
                        COMMENT 'the library groups the vendor is visible to'
17
                        AFTER language
18
            }
19
            );
20
21
            say $out "Added new column 'aqbooksellers.lib_group_visibility'";
22
        }
23
24
        if ( !column_exists( 'library_groups', 'ft_acquisitions' ) ) {
25
            $dbh->do(
26
                "ALTER TABLE `library_groups` ADD COLUMN `ft_acquisitions` tinyint(1) NOT NULL DEFAULT 0 AFTER `ft_local_float_group`"
27
            );
28
        }
29
30
    },
31
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 503-508 CREATE TABLE `aqbooksellers` ( Link Here
503
  `external_id` varchar(255) DEFAULT NULL COMMENT 'external id of the vendor',
503
  `external_id` varchar(255) DEFAULT NULL COMMENT 'external id of the vendor',
504
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'the payment method for the vendor',
504
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'the payment method for the vendor',
505
  `language` varchar(255) DEFAULT NULL COMMENT 'the language for the vendor',
505
  `language` varchar(255) DEFAULT NULL COMMENT 'the language for the vendor',
506
  `lib_group_visibility` varchar(255) DEFAULT NULL COMMENT 'the library groups the vendor is visible to',
506
  PRIMARY KEY (`id`),
507
  PRIMARY KEY (`id`),
507
  KEY `listprice` (`listprice`),
508
  KEY `listprice` (`listprice`),
508
  KEY `invoiceprice` (`invoiceprice`),
509
  KEY `invoiceprice` (`invoiceprice`),
Lines 4366-4371 CREATE TABLE `library_groups` ( Link Here
4366
  `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups',
4367
  `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups',
4367
  `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds',
4368
  `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds',
4368
  `ft_local_float_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as part of float group',
4369
  `ft_local_float_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as part of float group',
4370
  `ft_acquisitions` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group in the acquisitions module',
4369
  `created_on` timestamp NULL DEFAULT NULL COMMENT 'Date and time of creation',
4371
  `created_on` timestamp NULL DEFAULT NULL COMMENT 'Date and time of creation',
4370
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Date and time of last',
4372
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Date and time of last',
4371
  PRIMARY KEY (`id`),
4373
  PRIMARY KEY (`id`),
4372
- 

Return to bug 38290