Bug 21443: Update database
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
4fdc914cdd
commit
f6f1a56a98
|
|
@ -0,0 +1,22 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
if( !column_exists( 'itemtypes', 'rentalcharge_daily_calendar' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE itemtypes ADD COLUMN
|
||||
rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1
|
||||
AFTER rentalcharge_daily;
|
||||
});
|
||||
}
|
||||
|
||||
if( !column_exists( 'itemtypes', 'rentalcharge_hourly_calendar' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE itemtypes ADD COLUMN
|
||||
rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1
|
||||
AFTER rentalcharge_hourly;
|
||||
});
|
||||
}
|
||||
|
||||
# Always end with this (adjust the bug info)
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 21443: Add ability to exclude holidays when calculating rentals fees by time period)\n";
|
||||
}
|
||||
|
|
@ -878,7 +878,9 @@ CREATE TABLE `itemtypes` ( -- defines the item types
|
|||
description LONGTEXT, -- a plain text explanation of the item type
|
||||
rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
|
||||
rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
|
||||
rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the daily retnal fee is calculated directly or using finesCalendar
|
||||
rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
|
||||
rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the hourly retnal fee is calculated directly or using finesCalendar
|
||||
defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
|
||||
processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
|
||||
notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
|
||||
|
|
|
|||
Loading…
Reference in New Issue