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 504-509 CREATE TABLE `aqbooksellers` ( Link Here
504
  `external_id` varchar(255) DEFAULT NULL COMMENT 'external id of the vendor',
504
  `external_id` varchar(255) DEFAULT NULL COMMENT 'external id of the vendor',
505
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'the payment method for the vendor',
505
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'the payment method for the vendor',
506
  `language` varchar(255) DEFAULT NULL COMMENT 'the language for the vendor',
506
  `language` varchar(255) DEFAULT NULL COMMENT 'the language for the vendor',
507
  `lib_group_visibility` varchar(255) DEFAULT NULL COMMENT 'the library groups the vendor is visible to',
507
  PRIMARY KEY (`id`),
508
  PRIMARY KEY (`id`),
508
  KEY `listprice` (`listprice`),
509
  KEY `listprice` (`listprice`),
509
  KEY `invoiceprice` (`invoiceprice`),
510
  KEY `invoiceprice` (`invoiceprice`),
Lines 4328-4333 CREATE TABLE `library_groups` ( Link Here
4328
  `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups',
4329
  `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups',
4329
  `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds',
4330
  `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds',
4330
  `ft_local_float_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as part of float group',
4331
  `ft_local_float_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as part of float group',
4332
  `ft_acquisitions` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group in the acquisitions module',
4331
  `created_on` timestamp NULL DEFAULT NULL COMMENT 'Date and time of creation',
4333
  `created_on` timestamp NULL DEFAULT NULL COMMENT 'Date and time of creation',
4332
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Date and time of last',
4334
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Date and time of last',
4333
  PRIMARY KEY (`id`),
4335
  PRIMARY KEY (`id`),
4334
- 

Return to bug 38290