Lines 8-23
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( |
11 |
if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) { |
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 interface' |
15 |
} |
16 |
); |
17 |
|
12 |
|
18 |
say $out "Modified column 'borrower_attribute_types.mandatory'"; |
13 |
$dbh->do( |
|
|
14 |
q{ |
15 |
ALTER TABLE borrower_attribute_types |
16 |
MODIFY COLUMN `mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the staff interface' |
17 |
} |
18 |
); |
19 |
say $out "Modified column 'borrower_attribute_types.mandatory'"; |
19 |
|
20 |
|
20 |
if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) { |
|
|
21 |
$dbh->do( |
21 |
$dbh->do( |
22 |
q{ |
22 |
q{ |
23 |
ALTER TABLE borrower_attribute_types |
23 |
ALTER TABLE borrower_attribute_types |
Lines 25-31
return {
Link Here
|
25 |
AFTER `mandatory` |
25 |
AFTER `mandatory` |
26 |
} |
26 |
} |
27 |
); |
27 |
); |
28 |
|
|
|
29 |
say $out "Added column 'borrower_attribute_types.opac_mandatory'"; |
28 |
say $out "Added column 'borrower_attribute_types.opac_mandatory'"; |
30 |
|
29 |
|
31 |
$dbh->do(q{ |
30 |
$dbh->do(q{ |
32 |
- |
|
|