Bug 35044: DBRev 24.06.00.024

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Katrin Fischer 2024-08-23 15:46:10 +00:00
parent 4f3d78c8e3
commit 2b745e32a4
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 7 additions and 3 deletions

View file

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #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
# and is automatically called by Auth.pm when needed.
$VERSION = "24.06.00.023";
$VERSION = "24.06.00.024";
sub version {
return $VERSION;

View file

@ -18,7 +18,8 @@ return {
say_success( $out, "Added repeatable column to additional_fields table" );
}
if ( unique_key_exists ('additional_field_values', 'field_record') ) {
if ( unique_key_exists( 'additional_field_values', 'field_record' ) ) {
# Need to drop foreign key so that we can then drop the unique key
$dbh->do(
q{
@ -40,7 +41,10 @@ return {
`additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
}
);
say_success( $out, "Removed UNIQUE KEY `field_record` (`field_id`,`record_id`) from the additional_field_values table" );
say_success(
$out,
"Removed UNIQUE KEY `field_record` (`field_id`,`record_id`) from the additional_field_values table"
);
}
my $number_of_entries = $dbh->do(q{DELETE FROM additional_field_values WHERE value = ''});