| Lines 10422-10438
          if ( CheckVersion($DBversion) ) {
      
      
        Link Here | 
        
          | 10422 |  | 10422 |  | 
        
          | 10423 | $DBversion = "3.19.00.041"; | 10423 | $DBversion = "3.19.00.041"; | 
        
          | 10424 | if ( CheckVersion($DBversion) ) { | 10424 | if ( CheckVersion($DBversion) ) { | 
          
            
              | 10425 |     unless ( constraint_exists( 'suggestions', 'status' ) ) { | 10425 |     unless ( index_exists( 'suggestions', 'status' ) ) { | 
        
          | 10426 |         $dbh->do(q| | 10426 |         $dbh->do(q| | 
        
          | 10427 |             ALTER TABLE suggestions ADD KEY status (STATUS) | 10427 |             ALTER TABLE suggestions ADD KEY status (STATUS) | 
        
          | 10428 |         |); | 10428 |         |); | 
        
          | 10429 |     } | 10429 |     } | 
          
            
              | 10430 |     unless ( constraint_exists( 'suggestions', 'biblionumber' ) ) { | 10430 |     unless ( index_exists( 'suggestions', 'biblionumber' ) ) { | 
        
          | 10431 |         $dbh->do(q| | 10431 |         $dbh->do(q| | 
        
          | 10432 |             ALTER TABLE suggestions ADD KEY biblionumber (biblionumber) | 10432 |             ALTER TABLE suggestions ADD KEY biblionumber (biblionumber) | 
        
          | 10433 |         |); | 10433 |         |); | 
        
          | 10434 |     } | 10434 |     } | 
          
            
              | 10435 |     unless ( constraint_exists( 'suggestions', 'branchcode' ) ) { | 10435 |     unless ( index_exists( 'suggestions', 'branchcode' ) ) { | 
        
          | 10436 |         $dbh->do(q| | 10436 |         $dbh->do(q| | 
        
          | 10437 |             ALTER TABLE suggestions ADD KEY branchcode (branchcode) | 10437 |             ALTER TABLE suggestions ADD KEY branchcode (branchcode) | 
        
          | 10438 |         |); | 10438 |         |); | 
  
    | Lines 10450-10456
          if ( CheckVersion($DBversion) ) {
      
      
        Link Here | 
        
          | 10450 |         WHERE auth_types.authtypecode IS NULL | 10450 |         WHERE auth_types.authtypecode IS NULL | 
        
          | 10451 |     }); | 10451 |     }); | 
        
          | 10452 |  | 10452 |  | 
          
            
              | 10453 |     unless ( constraint_exists( 'auth_subfield_structure', 'auth_subfield_structure_ibfk_1' ) ) { | 10453 |     unless ( foreign_key_exists( 'auth_subfield_structure', 'auth_subfield_structure_ibfk_1' ) ) { | 
        
          | 10454 |         $dbh->do(q{ | 10454 |         $dbh->do(q{ | 
        
          | 10455 |             ALTER TABLE auth_subfield_structure | 10455 |             ALTER TABLE auth_subfield_structure | 
        
          | 10456 |             ADD CONSTRAINT auth_subfield_structure_ibfk_1 | 10456 |             ADD CONSTRAINT auth_subfield_structure_ibfk_1 | 
  
    | Lines 10573-10626
          if ( CheckVersion($DBversion) ) {
      
      
        Link Here | 
        
          | 10573 |  | 10573 |  | 
        
          | 10574 | $DBversion = "3.21.00.007"; | 10574 | $DBversion = "3.21.00.007"; | 
        
          | 10575 | if ( CheckVersion($DBversion) ) { | 10575 | if ( CheckVersion($DBversion) ) { | 
          
            
              | 10576 |     unless ( constraint_exists( 'aqbasket', 'authorisedby' ) ) { | 10576 |     unless ( index_exists( 'aqbasket', 'authorisedby' ) ) { | 
        
          | 10577 |         $dbh->do(q| | 10577 |         $dbh->do(q| | 
        
          | 10578 |             ALTER TABLE aqbasket | 10578 |             ALTER TABLE aqbasket | 
        
          | 10579 |                 ADD KEY authorisedby (authorisedby) | 10579 |                 ADD KEY authorisedby (authorisedby) | 
        
          | 10580 |         |); | 10580 |         |); | 
        
          | 10581 |     } | 10581 |     } | 
          
            
              | 10582 |     unless ( constraint_exists( 'aqbooksellers', 'name' ) ) { | 10582 |     unless ( index_exists( 'aqbooksellers', 'name' ) ) { | 
        
          | 10583 |         $dbh->do(q| | 10583 |         $dbh->do(q| | 
        
          | 10584 |             ALTER TABLE aqbooksellers | 10584 |             ALTER TABLE aqbooksellers | 
        
          | 10585 |                 ADD KEY name (name(255)) | 10585 |                 ADD KEY name (name(255)) | 
        
          | 10586 |         |); | 10586 |         |); | 
        
          | 10587 |     } | 10587 |     } | 
          
            
              | 10588 |     unless ( constraint_exists( 'aqbudgets', 'budget_parent_id' ) ) { | 10588 |     unless ( index_exists( 'aqbudgets', 'budget_parent_id' ) ) { | 
        
          | 10589 |         $dbh->do(q| | 10589 |         $dbh->do(q| | 
        
          | 10590 |             ALTER TABLE aqbudgets | 10590 |             ALTER TABLE aqbudgets | 
        
          | 10591 |                 ADD KEY budget_parent_id (budget_parent_id)|); | 10591 |                 ADD KEY budget_parent_id (budget_parent_id)|); | 
        
          | 10592 |         } | 10592 |         } | 
          
            
              | 10593 |     unless ( constraint_exists( 'aqbudgets', 'budget_code' ) ) { | 10593 |     unless ( index_exists( 'aqbudgets', 'budget_code' ) ) { | 
        
          | 10594 |         $dbh->do(q| | 10594 |         $dbh->do(q| | 
        
          | 10595 |             ALTER TABLE aqbudgets | 10595 |             ALTER TABLE aqbudgets | 
        
          | 10596 |                 ADD KEY budget_code (budget_code)|); | 10596 |                 ADD KEY budget_code (budget_code)|); | 
        
          | 10597 |     } | 10597 |     } | 
          
            
              | 10598 |     unless ( constraint_exists( 'aqbudgets', 'budget_branchcode' ) ) { | 10598 |     unless ( index_exists( 'aqbudgets', 'budget_branchcode' ) ) { | 
        
          | 10599 |         $dbh->do(q| | 10599 |         $dbh->do(q| | 
        
          | 10600 |             ALTER TABLE aqbudgets | 10600 |             ALTER TABLE aqbudgets | 
        
          | 10601 |                 ADD KEY budget_branchcode (budget_branchcode)|); | 10601 |                 ADD KEY budget_branchcode (budget_branchcode)|); | 
        
          | 10602 |     } | 10602 |     } | 
          
            
              | 10603 |     unless ( constraint_exists( 'aqbudgets', 'budget_period_id' ) ) { | 10603 |     unless ( index_exists( 'aqbudgets', 'budget_period_id' ) ) { | 
        
          | 10604 |         $dbh->do(q| | 10604 |         $dbh->do(q| | 
        
          | 10605 |             ALTER TABLE aqbudgets | 10605 |             ALTER TABLE aqbudgets | 
        
          | 10606 |                 ADD KEY budget_period_id (budget_period_id)|); | 10606 |                 ADD KEY budget_period_id (budget_period_id)|); | 
        
          | 10607 |     } | 10607 |     } | 
          
            
              | 10608 |     unless ( constraint_exists( 'aqbudgets', 'budget_owner_id' ) ) { | 10608 |     unless ( index_exists( 'aqbudgets', 'budget_owner_id' ) ) { | 
        
          | 10609 |         $dbh->do(q| | 10609 |         $dbh->do(q| | 
        
          | 10610 |             ALTER TABLE aqbudgets | 10610 |             ALTER TABLE aqbudgets | 
        
          | 10611 |                 ADD KEY budget_owner_id (budget_owner_id)|); | 10611 |                 ADD KEY budget_owner_id (budget_owner_id)|); | 
        
          | 10612 |     } | 10612 |     } | 
          
            
              | 10613 |     unless ( constraint_exists( 'aqbudgets_planning', 'budget_period_id' ) ) { | 10613 |     unless ( index_exists( 'aqbudgets_planning', 'budget_period_id' ) ) { | 
        
          | 10614 |         $dbh->do(q| | 10614 |         $dbh->do(q| | 
        
          | 10615 |             ALTER TABLE aqbudgets_planning | 10615 |             ALTER TABLE aqbudgets_planning | 
        
          | 10616 |                 ADD KEY budget_period_id (budget_period_id)|); | 10616 |                 ADD KEY budget_period_id (budget_period_id)|); | 
        
          | 10617 |     } | 10617 |     } | 
          
            
              | 10618 |     unless ( constraint_exists( 'aqorders', 'parent_ordernumber' ) ) { | 10618 |     unless ( index_exists( 'aqorders', 'parent_ordernumber' ) ) { | 
        
          | 10619 |         $dbh->do(q| | 10619 |         $dbh->do(q| | 
        
          | 10620 |             ALTER TABLE aqorders | 10620 |             ALTER TABLE aqorders | 
        
          | 10621 |                 ADD KEY parent_ordernumber (parent_ordernumber)|); | 10621 |                 ADD KEY parent_ordernumber (parent_ordernumber)|); | 
        
          | 10622 |     } | 10622 |     } | 
          
            
              | 10623 |     unless ( constraint_exists( 'aqorders', 'orderstatus' ) ) { | 10623 |     unless ( index_exists( 'aqorders', 'orderstatus' ) ) { | 
        
          | 10624 |         $dbh->do(q| | 10624 |         $dbh->do(q| | 
        
          | 10625 |             ALTER TABLE aqorders | 10625 |             ALTER TABLE aqorders | 
        
          | 10626 |                 ADD KEY orderstatus (orderstatus)|); | 10626 |                 ADD KEY orderstatus (orderstatus)|); | 
  
    | Lines 10726-10732
          if ( CheckVersion($DBversion) ) {
      
      
        Link Here | 
        
          | 10726 |         VALUES ('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent) or might be deleted (transient)','transient|persistent','Choice') | 10726 |         VALUES ('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent) or might be deleted (transient)','transient|persistent','Choice') | 
        
          | 10727 |     }); | 10727 |     }); | 
        
          | 10728 |  | 10728 |  | 
          
            
              | 10729 |     if ( constraint_exists( 'oai_sets_biblios', 'oai_sets_biblios_ibfk_1' ) ) { | 10729 |     if ( foreign_key_exists( 'oai_sets_biblios', 'oai_sets_biblios_ibfk_1' ) ) { | 
        
          | 10730 |         $dbh->do(q| | 10730 |         $dbh->do(q| | 
        
          | 10731 |             ALTER TABLE oai_sets_biblios DROP FOREIGN KEY oai_sets_biblios_ibfk_1 | 10731 |             ALTER TABLE oai_sets_biblios DROP FOREIGN KEY oai_sets_biblios_ibfk_1 | 
        
          | 10732 |         |); | 10732 |         |); | 
  
    | Lines 10858-10864
          if ( CheckVersion($DBversion) ) {
      
      
        Link Here | 
        
          | 10858 |     my ($print_error) = $dbh->{PrintError}; | 10858 |     my ($print_error) = $dbh->{PrintError}; | 
        
          | 10859 |     $dbh->{RaiseError} = 0; | 10859 |     $dbh->{RaiseError} = 0; | 
        
          | 10860 |     $dbh->{PrintError} = 0; | 10860 |     $dbh->{PrintError} = 0; | 
          
            
              | 10861 |     if ( constraint_exists('course_reserves', 'course_reserves_ibfk_2') ) { | 10861 |     if ( foreign_key_exists('course_reserves', 'course_reserves_ibfk_2') ) { | 
        
          | 10862 |         $dbh->do(q{ALTER TABLE course_reserves DROP FOREIGN KEY course_reserves_ibfk_2}); | 10862 |         $dbh->do(q{ALTER TABLE course_reserves DROP FOREIGN KEY course_reserves_ibfk_2}); | 
        
          | 10863 |         $dbh->do(q{ALTER TABLE course_reserves DROP INDEX course_reserves_ibfk_2}); | 10863 |         $dbh->do(q{ALTER TABLE course_reserves DROP INDEX course_reserves_ibfk_2}); | 
        
          | 10864 |     } | 10864 |     } |