Bug 32773: Add column biblio_framework.is_fast_add

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Brendan Lawlor 2024-10-29 20:43:44 +00:00 committed by Lucas Gass
parent bbf1cf504e
commit c11a324468
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,30 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
return {
bug_number => "32773",
description => "Add ability to have more than 1 Fast add framework",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
if ( !column_exists( 'biblio_framework', 'is_fast_add' ) ) {
$dbh->do(
q{
ALTER TABLE biblio_framework
ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast add framework'
AFTER frameworktext;
}
);
say_success( $out, "Added column 'biblio_framework.is_fast_add'" );
$dbh->do(
q{
UPDATE biblio_framework SET is_fast_add = 1 where frameworkcode = 'FA';
}
);
say_success( $out, "Set is_fast_add = 1 for FA framework'" );
} else {
say_info( $out, "Column 'biblio_framework.is_fast_add' already exists!" );
}
},
};

View File

@ -1131,6 +1131,7 @@ DROP TABLE IF EXISTS `biblio_framework`;
CREATE TABLE `biblio_framework` (
`frameworkcode` varchar(4) NOT NULL DEFAULT '' COMMENT 'the unique code assigned to the framework',
`frameworktext` varchar(255) NOT NULL DEFAULT '' COMMENT 'the description/name given to the framework',
`is_fast_add` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast add framework',
PRIMARY KEY (`frameworkcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;