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

(-)a/installer/data/mysql/atomicupdate/bug_35635_add_opac_mandatory.pl (-2 / +10 lines)
Lines 8-18 return { Link Here
8
        my ($args) = @_;
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
10
11
        $dbh->do(
12
            q{
13
                ALTER TABLE borrower_attribute_types
14
                MODIFY COLUMN `mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the staff client'
15
            }
16
        );
17
18
        say $out "Modified column 'borrower_attribute_types.mandatory'";
19
11
        if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) {
20
        if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) {
12
            $dbh->do(
21
            $dbh->do(
13
                q{
22
                q{
14
                    ALTER TABLE borrower_attribute_types
23
                    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'
24
                    ADD COLUMN `opac_mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the OPAC'
16
                    AFTER `mandatory`
25
                    AFTER `mandatory`
17
                }
26
                }
18
            );
27
            );
19
- 

Return to bug 35635