Bug 18316: DBRev 18.06.00.054

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2018-11-07 23:08:03 +00:00
parent 529d8cd730
commit 07526d897a
4 changed files with 20 additions and 12 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 = "18.06.00.053";
$VERSION = "18.06.00.054";
sub version {
return $VERSION;

View file

@ -53,6 +53,12 @@ the human readable name of the field, for display
what type of data this holds, relevant when storing it in the search engine
=head2 weight
data_type: 'decimal'
is_nullable: 1
size: [5,2]
=cut
__PACKAGE__->add_columns(
@ -70,6 +76,8 @@ __PACKAGE__->add_columns(
},
is_nullable => 0,
},
"weight",
{ data_type => "decimal", is_nullable => 1, size => [5, 2] },
);
=head1 PRIMARY KEY
@ -116,8 +124,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-27 04:12:00
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:axyQNupqtw+5gMh1rsIHAg
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2018-11-07 22:22:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4Q+IXwF0hViF8+kpR96eLA
__PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map");

View file

@ -1,9 +0,0 @@
$DBversion = 'XXX';
if( CheckVersion( $DBversion ) ) {
if( !column_exists( 'search_field', 'weight' ) ) {
$dbh->do( "ALTER TABLE `search_field` ADD COLUMN `weight` decimal(5,2) DEFAULT NULL AFTER `type`" );
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 18316 - Add column search_field.weight)\n";
}

View file

@ -16916,6 +16916,15 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 15494 - Block renewals by arbitrary item values)\n";
}
$DBversion = '18.06.00.054';
if( CheckVersion( $DBversion ) ) {
if( !column_exists( 'search_field', 'weight' ) ) {
$dbh->do( "ALTER TABLE `search_field` ADD COLUMN `weight` decimal(5,2) DEFAULT NULL AFTER `type`" );
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 18316 - Add column search_field.weight)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.