Bug 28490: DBRev 21.06.00.002
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
7a0de31b0a
commit
01734a9ca3
2
Koha.pm
2
Koha.pm
|
|
@ -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 = "21.06.00.001";
|
||||
$VERSION = "21.06.00.002";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
if( !column_exists( 'borrower_modifications', 'relationship' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE borrower_modifications ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `borrowernotes`
|
||||
});
|
||||
}
|
||||
|
||||
if( !column_exists( 'borrowers', 'relationship' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE borrowers ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor' AFTER `borrowernotes`
|
||||
});
|
||||
}
|
||||
|
||||
if( !column_exists( 'deletedborrowers', 'relationship' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE deletedborrowers ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor' AFTER `borrowernotes`
|
||||
});
|
||||
}
|
||||
|
||||
NewVersion( $DBversion, 28490, "Bring back accidentally deleted relationship columns");
|
||||
}
|
||||
|
|
@ -24296,6 +24296,29 @@ if ( CheckVersion($DBversion) ) {
|
|||
NewVersion( $DBversion, '28489', 'Modify sessions.a_session from longtext to longblob' );
|
||||
}
|
||||
|
||||
$DBversion = '21.06.00.002';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
if( !column_exists( 'borrower_modifications', 'relationship' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE borrower_modifications ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `borrowernotes`
|
||||
});
|
||||
}
|
||||
|
||||
if( !column_exists( 'borrowers', 'relationship' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE borrowers ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor' AFTER `borrowernotes`
|
||||
});
|
||||
}
|
||||
|
||||
if( !column_exists( 'deletedborrowers', 'relationship' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE deletedborrowers ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor' AFTER `borrowernotes`
|
||||
});
|
||||
}
|
||||
|
||||
NewVersion( $DBversion, 28490, "Bring back accidentally deleted relationship columns");
|
||||
}
|
||||
|
||||
# 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/';
|
||||
|
|
|
|||
Loading…
Reference in New Issue