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

(-)a/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl (+32 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  => "35635",
6
    description => "Add opac_mandatory column to borrower_attribute_type table",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) {
12
            $dbh->do(
13
                q{
14
                    ALTER TABLE borrower_attribute_types
15
                    ADD COLUMN `opac_mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not on the OPAC'
16
                    AFTER `mandatory`
17
                }
18
            );
19
20
            say $out "Added column 'borrower_attribute_types.opac_mandatory'";
21
22
            $dbh->do(
23
                q{
24
                UPDATE borrower_attribute_types
25
                SET opac_mandatory = 1 WHERE mandatory = 1;
26
            }
27
            );
28
            say $out "Update opac_mandatory to match mandatory column";
29
        }
30
    },
31
32
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 6755-6758 CREATE TABLE `zebraqueue` ( Link Here
6755
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6755
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6756
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6756
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6757
6757
6758
-- Dump completed on 2024-11-25 12:13:27
6758
-- Dump completed on 2024-11-25 12:13:27
6759
- 

Return to bug 35635