Bug 36330: DBRev 24.06.00.007

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2024-06-13 14:30:25 +01:00
parent 35796b3a29
commit faac1c9738
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 9 additions and 5 deletions

View file

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion. # - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself # used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed. # and is automatically called by Auth.pm when needed.
$VERSION = "24.06.00.006"; $VERSION = "24.06.00.007";
sub version { sub version {
return $VERSION; return $VERSION;

View file

@ -9,14 +9,18 @@ return {
my ( $dbh, $out ) = @$args{qw(dbh out)}; my ( $dbh, $out ) = @$args{qw(dbh out)};
# Update columns, only changing the COMMENT # Update columns, only changing the COMMENT
my $affected1 = $dbh->do(q{ ALTER TABLE course_items MODIFY `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reserve (optional)' }); my $affected1 = $dbh->do(
if ( $affected1 ) { q{ ALTER TABLE course_items MODIFY `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reserve (optional)' }
);
if ($affected1) {
say_success( $out, "Comment for course_items.location was updated." ); say_success( $out, "Comment for course_items.location was updated." );
} else { } else {
say_failure( $out, "Comment for course_items.location was not updated." ); say_failure( $out, "Comment for course_items.location was not updated." );
} }
my $affected2 = $dbh->do(q{ ALTER TABLE course_items MODIFY `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reserve, this field will be ''yes'', otherwise it will be ''no''' }); my $affected2 = $dbh->do(
if ( $affected2 ) { q{ ALTER TABLE course_items MODIFY `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reserve, this field will be ''yes'', otherwise it will be ''no''' }
);
if ($affected2) {
say_success( $out, "Comment for course_items.enabled was updated." ); say_success( $out, "Comment for course_items.enabled was updated." );
} else { } else {
say_failure( $out, "Comment for course_items.enabled was not updated." ); say_failure( $out, "Comment for course_items.enabled was not updated." );