Lines 24296-24388
unless ( $ENV{HTTP_HOST} ) { # Is that correct?
Link Here
|
24296 |
} |
24296 |
} |
24297 |
} |
24297 |
} |
24298 |
|
24298 |
|
24299 |
$DBversion = '21.06.00.001'; |
|
|
24300 |
if ( CheckVersion($DBversion) ) { |
24301 |
$dbh->do('DELETE FROM sessions'); |
24302 |
$dbh->do('ALTER TABLE sessions MODIFY a_session LONGBLOB NOT NULL'); |
24303 |
|
24304 |
NewVersion( $DBversion, '28489', 'Modify sessions.a_session from longtext to longblob' ); |
24305 |
} |
24306 |
|
24307 |
$DBversion = '21.06.00.002'; |
24308 |
if( CheckVersion( $DBversion ) ) { |
24309 |
if( !column_exists( 'borrower_modifications', 'relationship' ) ) { |
24310 |
$dbh->do(q{ |
24311 |
ALTER TABLE borrower_modifications ADD COLUMN `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `borrowernotes` |
24312 |
}); |
24313 |
} |
24314 |
|
24315 |
if( !column_exists( 'borrowers', 'relationship' ) ) { |
24316 |
$dbh->do(q{ |
24317 |
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` |
24318 |
}); |
24319 |
} |
24320 |
|
24321 |
if( !column_exists( 'deletedborrowers', 'relationship' ) ) { |
24322 |
$dbh->do(q{ |
24323 |
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` |
24324 |
}); |
24325 |
} |
24326 |
|
24327 |
NewVersion( $DBversion, 28490, "Bring back accidentally deleted relationship columns"); |
24328 |
} |
24329 |
|
24330 |
$DBversion = '21.06.00.003'; |
24331 |
if( CheckVersion( $DBversion ) ) { |
24332 |
|
24333 |
# Add 'WrongTransfer' to branchtransfers cancellation_reason enum |
24334 |
$dbh->do( |
24335 |
q{ |
24336 |
ALTER TABLE |
24337 |
`branchtransfers` |
24338 |
MODIFY COLUMN |
24339 |
`cancellation_reason` enum( |
24340 |
'Manual', |
24341 |
'StockrotationAdvance', |
24342 |
'StockrotationRepatriation', |
24343 |
'ReturnToHome', |
24344 |
'ReturnToHolding', |
24345 |
'RotatingCollection', |
24346 |
'Reserve', |
24347 |
'LostReserve', |
24348 |
'CancelReserve', |
24349 |
'ItemLost', |
24350 |
'WrongTransfer' |
24351 |
) |
24352 |
AFTER `comments` |
24353 |
} |
24354 |
); |
24355 |
|
24356 |
NewVersion( $DBversion, 24434, "Add 'WrongTransfer' to branchtransfers.cancellation_reason enum"); |
24357 |
} |
24358 |
|
24359 |
$DBversion = '21.06.00.004'; |
24360 |
if ( CheckVersion($DBversion) ) { |
24361 |
|
24362 |
$dbh->do(q{ |
24363 |
INSERT IGNORE permissions (module_bit, code, description) |
24364 |
VALUES |
24365 |
(4, 'delete_borrowers', 'Delete borrowers') |
24366 |
}); |
24367 |
|
24368 |
$dbh->do(q{ |
24369 |
INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) |
24370 |
SELECT borrowernumber, 4, 'delete_borrowers' FROM user_permissions WHERE code = 'edit_borrowers' |
24371 |
}); |
24372 |
|
24373 |
NewVersion( $DBversion, 15788, "Split edit_borrowers permission" ); |
24374 |
} |
24375 |
|
24376 |
$DBversion = '21.06.00.005'; |
24377 |
if( CheckVersion( $DBversion ) ) { |
24378 |
$dbh->do( q{ |
24379 |
INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) |
24380 |
VALUES ('NewsLog', '0', 'If enabled, log OPAC News changes', '', 'YesNo') |
24381 |
}); |
24382 |
|
24383 |
NewVersion( $DBversion, 26205, "Add new system preference NewsLog to log news changes"); |
24384 |
} |
24385 |
|
24386 |
# SEE bug 13068 |
24299 |
# SEE bug 13068 |
24387 |
# if there is anything in the atomicupdate, read and execute it. |
24300 |
# if there is anything in the atomicupdate, read and execute it. |
24388 |
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; |
24301 |
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; |
24389 |
- |
|
|