Bug 7534: DBRev 18.06.00.024

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2018-09-06 16:52:59 +00:00
parent de629e2a28
commit f190ef3f2e
4 changed files with 20 additions and 10 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.023";
$VERSION = "18.06.00.024";
sub version {
return $VERSION;

View File

@ -140,6 +140,12 @@ __PACKAGE__->table("branches");
is_nullable: 1
size: 16
=head2 pickup_location
data_type: 'tinyint'
default_value: 1
is_nullable: 0
=cut
__PACKAGE__->add_columns(
@ -187,6 +193,8 @@ __PACKAGE__->add_columns(
{ data_type => "varchar", is_nullable => 1, size => 255 },
"marcorgcode",
{ data_type => "varchar", is_nullable => 1, size => 16 },
"pickup_location",
{ data_type => "tinyint", default_value => 1, is_nullable => 0 },
);
=head1 PRIMARY KEY
@ -609,8 +617,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QOMUFz2EjvAVWCkIpNmvtg
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-06 16:28:49
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N0tdcSAb4bMht/i0chipYQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration

View File

@ -1,7 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "ALTER TABLE branches ADD COLUMN pickup_location TINYINT(1) not null default 1" );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 7534 - Let libraries have configuration for pickup locations)\n";
}

View File

@ -16349,6 +16349,15 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 18639 - Add replacementprice field to aqorders table)\n";
}
$DBversion = '18.06.00.024';
if( CheckVersion( $DBversion ) ) {
if( !column_exists( 'branches', 'pickup_location' ) ){
$dbh->do( "ALTER TABLE branches ADD COLUMN pickup_location TINYINT(1) not null default 1" );
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 7534 - Let libraries have configuration for pickup locations)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.