Bug 15497: DBRev 19.06.00.027

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-09-12 16:32:37 +01:00
parent b12a56c186
commit 13f83dc6e3
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
3 changed files with 19 additions and 18 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 = "19.06.00.026";
$VERSION = "19.06.00.027";
sub version {
return $VERSION;

View File

@ -1,17 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
if( !TableExists( 'itemtypes_branches' ) ) {
$dbh->do( "
CREATE TABLE itemtypes_branches( -- association table between authorised_values and branches
itemtype VARCHAR(10) NOT NULL,
branchcode VARCHAR(10) NOT NULL,
FOREIGN KEY (itemtype) REFERENCES itemtypes(itemtype) ON DELETE CASCADE,
FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 15497 - Add itemtypes_branches table)\n";
}

View File

@ -19418,6 +19418,24 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 20691 - Add ability for guarantors to view guarantee's fines in OPAC)\n";
}
$DBversion = '19.06.00.027';
if( CheckVersion( $DBversion ) ) {
if( !TableExists( 'itemtypes_branches' ) ) {
$dbh->do( "
CREATE TABLE itemtypes_branches( -- association table between authorised_values and branches
itemtype VARCHAR(10) NOT NULL,
branchcode VARCHAR(10) NOT NULL,
FOREIGN KEY (itemtype) REFERENCES itemtypes(itemtype) ON DELETE CASCADE,
FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 15497 - Add itemtypes_branches table)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';