Bug 24476: Rename autorenewal to autorenew_checkouts
[koha.git] / installer / data / mysql / atomicupdate / bug_24476_opt_out_of_auto_renewal.perl
index 9bc691b..50edba9 100644 (file)
@@ -1,20 +1,20 @@
 $DBversion = 'XXX';
 if( CheckVersion( $DBversion ) ) {
-    unless( column_exists('borrowers','autorenewal') ){
-        $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenewal TINYINT(1) NOT NULL DEFAULT 1" );
+    unless( column_exists('borrowers','autorenew_checkouts') ){
+        $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
     }
-    unless( column_exists('deletedborrowers','autorenewal') ){
-        $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenewal TINYINT(1) NOT NULL DEFAULT 1" );
+    unless( column_exists('deletedborrowers','autorenew_checkouts') ){
+        $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
     }
-    unless( column_exists('borrower_modifications','autorenewal') ){
-        $dbh->do( "ALTER TABLE borrower_modifications ADD COLUMN autorenewal TINYINT(1) NOT NULL DEFAULT 1" );
+    unless( column_exists('borrower_modifications','autorenew_checkouts') ){
+        $dbh->do( "ALTER TABLE borrower_modifications ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" );
     }
     $dbh->do(q{
         UPDATE systempreferences
-        SET value  = CONCAT(value,'|autorenewal')
+        SET value  = CONCAT(value,'|autorenew_checkouts')
         WHERE variable IN
         ('PatronSelfModificationBorrowerUnwantedField','PatronSelfRegistrationBorrowerUnwantedField')
-        AND value NOT LIKE '%autorenewal%'
+        AND value NOT LIKE '%autorenew_checkouts%'
     });
     SetVersion( $DBversion );
     print "Upgrade to $DBversion done (Bug 24476 - Allow patrons to opt-out of autorenewal)\n";