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 AFTER anonymized" );
6 unless( column_exists('deletedborrowers','autorenew_checkouts') ){
7 $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1 AFTER anonymized" );
10 INSERT IGNORE INTO systempreferences
11 ( `variable`, `value`, `options`, `explanation`, `type` )
13 ('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo')
15 SetVersion( $DBversion );
16 print "Upgrade to $DBversion done (Bug 24476 - Allow patrons to opt-out of autorenewal)\n";