2 if( CheckVersion( $DBversion ) ) {
3 unless( column_exists('borrowers','autorenew_checkouts') ){
4 $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
6 unless( column_exists('deletedborrowers','autorenew_checkouts') ){
7 $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
9 unless( column_exists('borrower_modifications','autorenew_checkouts') ){
10 $dbh->do( "ALTER TABLE borrower_modifications ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
13 UPDATE systempreferences
14 SET value = CONCAT(value,'|autorenew_checkouts')
16 ('PatronSelfModificationBorrowerUnwantedField','PatronSelfRegistrationBorrowerUnwantedField')
17 AND value NOT LIKE '%autorenew_checkouts%'
19 SetVersion( $DBversion );
20 print "Upgrade to $DBversion done (Bug 24476 - Allow patrons to opt-out of autorenewal)\n";