Bug 35635: (follow-up) Fix DBRev

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-12-02 18:10:49 +00:00 committed by Katrin Fischer
parent 56dbd0b491
commit 189fde2304
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 10 additions and 1 deletions

View File

@ -8,11 +8,20 @@ return {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{
ALTER TABLE borrower_attribute_types
MODIFY COLUMN `mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the staff client'
}
);
say $out "Modified column 'borrower_attribute_types.mandatory'";
if ( !column_exists( 'borrower_attribute_types', 'opac_mandatory' ) ) {
$dbh->do(
q{
ALTER TABLE borrower_attribute_types
ADD COLUMN `opac_mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not on the OPAC'
ADD COLUMN `opac_mandatory` tinyint(1) DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not in the OPAC'
AFTER `mandatory`
}
);