From 0001a8836c2811492f1daa91a0b8acf3f7cf95e5 Mon Sep 17 00:00:00 2001 From: charles Date: Wed, 22 Apr 2015 16:03:54 -0400 Subject: [PATCH] Bug 12768 - Updated schema files --- Koha/Schema/Result/Itemtype.pm | 26 +++++++++++++++++----- .../atomicupdate/bug_12768-update_schema_files.sql | 2 ++ installer/data/mysql/kohastructure.sql | 4 +++- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_12768-update_schema_files.sql diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index 1ed6b3b..80eb282 100644 --- a/Koha/Schema/Result/Itemtype.pm +++ b/Koha/Schema/Result/Itemtype.pm @@ -37,9 +37,21 @@ __PACKAGE__->table("itemtypes"); =head2 rentalcharge - data_type: 'double precision' + data_type: 'decimal' is_nullable: 1 - size: [16,4] + size: [28,6] + +=head2 defaultreplacecost + + data_type: 'decimal' + is_nullable: 1 + size: [28,6] + +=head2 processfee + + data_type: 'decimal' + is_nullable: 1 + size: [28,6] =head2 notforloan @@ -84,7 +96,11 @@ __PACKAGE__->add_columns( "description", { data_type => "mediumtext", is_nullable => 1 }, "rentalcharge", - { data_type => "double precision", is_nullable => 1, size => [16, 4] }, + { data_type => "decimal", is_nullable => 1, size => [28, 6] }, + "defaultreplacecost", + { data_type => "decimal", is_nullable => 1, size => [28, 6] }, + "processfee", + { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "notforloan", { data_type => "smallint", is_nullable => 1 }, "imageurl", @@ -149,8 +165,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-04-28 18:01:17 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:urVYwhpfBgknZLIhjkqhnw +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-04-22 16:14:26 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QLnNg3Vp/n5JwZNXjqOlow # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_12768-update_schema_files.sql b/installer/data/mysql/atomicupdate/bug_12768-update_schema_files.sql new file mode 100644 index 0000000..4d6cd35 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_12768-update_schema_files.sql @@ -0,0 +1,2 @@ +ALTER TABLE `itemtypes` ADD `defaultreplacecost` DECIMAL(28,6) NULL DEFAULT NULL AFTER `rentalcharge`; +ALTER TABLE `itemtypes` ADD `processfee` DECIMAL(28,6) NULL DEFAULT NULL AFTER `defaultreplacecost`; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index aaef328..c7bd1f1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1273,7 +1273,9 @@ DROP TABLE IF EXISTS `itemtypes`; CREATE TABLE `itemtypes` ( -- defines the item types itemtype varchar(10) NOT NULL default '', -- unique key, a code associated with the item type description mediumtext, -- a plain text explanation of the item type - rentalcharge double(16,4) default NULL, -- the amount charged when this item is checked out/issued + rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued + 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 imageurl varchar(200) default NULL, -- URL for the item type icon summary text, -- information from the summary field, may include HTML -- 2.1.4