https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32450
--- Comment #7 from Martin Renvoize <[email protected]> --- Comment on attachment 145128 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145128 Bug 32450: Update db to add noissuescharge flag and remove sysprefs Review of attachment 145128: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=32450&attachment=145128) ----------------------------------------------------------------- ::: installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl @@ +6,5 @@ > + up => sub { > + my ($args) = @_; > + my ($dbh, $out) = @$args{qw(dbh out)}; > + > + if( !column_exists( 'account_debit_types', 'no_issues_charge' ) ) { I'd be tempted to name this 'blocks_issue' or 'prevents_issue' or something as opposed to 'no_issues_charge'. @@ +15,5 @@ > + say $out "Added column 'account_debit_types.no_issues_charge'"; > + } > + > + $dbh->do(q{ > + DELETE FROM systempreferences WHERE variable = > 'ManInvInNoissuesCharge' We'll need an extra step in here I'm afraid.. We're not accounting for the current state of the system preference at upgrade time. You'll want to check the current value of ManInvInNoissuesCharge and set the boolean flag for the appropriate, prior to this patch hard coded, set of debit types based on it. @@ +19,5 @@ > + DELETE FROM systempreferences WHERE variable = > 'ManInvInNoissuesCharge' > + }); > + > + $dbh->do(q{ > + DELETE FROM systempreferences WHERE variable = > 'RentalsInNoissuesCharge' As above @@ +22,5 @@ > + $dbh->do(q{ > + DELETE FROM systempreferences WHERE variable = > 'RentalsInNoissuesCharge' > + }); > + $dbh->do(q{ > + DELETE FROM systempreferences WHERE variable = > 'HoldsInNoissuesCharge' As above -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
