# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
-$VERSION = "19.12.00.017";
+$VERSION = "19.12.00.018";
sub version {
return $VERSION;
+++ /dev/null
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
- my @columns = qw(
- restrictedtype
- rentaldiscount
- fine
- finedays
- maxsuspensiondays
- suspension_chargeperiod
- firstremind
- chargeperiod
- chargeperiod_charge_at
- accountsent
- issuelength
- lengthunit
- hardduedate
- hardduedatecompare
- renewalsallowed
- renewalperiod
- norenewalbefore
- auto_renew
- no_auto_renewal_after
- no_auto_renewal_after_hard_limit
- reservesallowed
- holds_per_record
- holds_per_day
- onshelfholds
- opacitemholds
- overduefinescap
- cap_fine_to_replacement_price
- article_requests
- note
- );
-
- if ( column_exists( 'issuingrules', 'categorycode' ) ) {
- foreach my $column ( @columns ) {
- $dbh->do("
- INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value )
- SELECT IF(categorycode='*', NULL, categorycode), IF(branchcode='*', NULL, branchcode), IF(itemtype='*', NULL, itemtype), \'$column\', COALESCE( $column, '' )
- FROM issuingrules
- ");
- }
- $dbh->do("DROP TABLE issuingrules");
- }
-
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 18936: Convert issuingrules fields to circulation_rules)\n";
-}
print "Upgrade to $DBversion done (Bug 21674 - Add unique key (parent_id, branchcode) to library_group)\n";
}
+$DBversion = '19.12.00.018';
+if( CheckVersion( $DBversion ) ) {
+ my @columns = qw(
+ restrictedtype
+ rentaldiscount
+ fine
+ finedays
+ maxsuspensiondays
+ suspension_chargeperiod
+ firstremind
+ chargeperiod
+ chargeperiod_charge_at
+ accountsent
+ issuelength
+ lengthunit
+ hardduedate
+ hardduedatecompare
+ renewalsallowed
+ renewalperiod
+ norenewalbefore
+ auto_renew
+ no_auto_renewal_after
+ no_auto_renewal_after_hard_limit
+ reservesallowed
+ holds_per_record
+ holds_per_day
+ onshelfholds
+ opacitemholds
+ overduefinescap
+ cap_fine_to_replacement_price
+ article_requests
+ note
+ );
+
+ if ( column_exists( 'issuingrules', 'categorycode' ) ) {
+ foreach my $column ( @columns ) {
+ $dbh->do("
+ INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value )
+ SELECT IF(categorycode='*', NULL, categorycode), IF(branchcode='*', NULL, branchcode), IF(itemtype='*', NULL, itemtype), \'$column\', COALESCE( $column, '' )
+ FROM issuingrules
+ ");
+ }
+ $dbh->do("DROP TABLE issuingrules");
+ }
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 18936: Convert issuingrules fields to circulation_rules)\n";
+}
+
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';