From 3d096d164e746e256ac834cb8c2cef0fe8dea6d7 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 Signed-off-by: Eivin Giske Skaaren Signed-off-by: Kyle M Hall --- Koha/Schema/Result/Biblioitem.pm | 9 ++++---- Koha/Schema/Result/Deletedbiblioitem.pm | 9 ++++---- Koha/Schema/Result/Itemtype.pm | 26 +++++++++++++++++----- .../atomicupdate/bug_12768-update_schema_files.sql | 3 +++ installer/data/mysql/kohastructure.sql | 4 +++- 5 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_12768-update_schema_files.sql diff --git a/Koha/Schema/Result/Biblioitem.pm b/Koha/Schema/Result/Biblioitem.pm index fcc9676..ff5fb31 100644 --- a/Koha/Schema/Result/Biblioitem.pm +++ b/Koha/Schema/Result/Biblioitem.pm @@ -64,9 +64,8 @@ __PACKAGE__->table("biblioitems"); =head2 ean - data_type: 'varchar' + data_type: 'mediumtext' is_nullable: 1 - size: 13 =head2 publicationyear @@ -226,7 +225,7 @@ __PACKAGE__->add_columns( "issn", { data_type => "mediumtext", is_nullable => 1 }, "ean", - { data_type => "varchar", is_nullable => 1, size => 13 }, + { data_type => "mediumtext", is_nullable => 1 }, "publicationyear", { data_type => "text", is_nullable => 1 }, "publishercode", @@ -327,8 +326,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-01-13 08:36:25 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cAlg2aIZ7hxeq+Hgl1AJcA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-09 20:10:31 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OoIhHLWPdPhj8ebykXpT/w __PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" ); diff --git a/Koha/Schema/Result/Deletedbiblioitem.pm b/Koha/Schema/Result/Deletedbiblioitem.pm index ca5805f..0fa543b 100644 --- a/Koha/Schema/Result/Deletedbiblioitem.pm +++ b/Koha/Schema/Result/Deletedbiblioitem.pm @@ -63,9 +63,8 @@ __PACKAGE__->table("deletedbiblioitems"); =head2 ean - data_type: 'varchar' + data_type: 'mediumtext' is_nullable: 1 - size: 13 =head2 publicationyear @@ -220,7 +219,7 @@ __PACKAGE__->add_columns( "issn", { data_type => "mediumtext", is_nullable => 1 }, "ean", - { data_type => "varchar", is_nullable => 1, size => 13 }, + { data_type => "mediumtext", is_nullable => 1 }, "publicationyear", { data_type => "text", is_nullable => 1 }, "publishercode", @@ -289,8 +288,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("biblioitemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-01-13 08:36:25 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZFXb+BlsrsArv8qE2DrkkA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-09 20:10:31 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ixfwjOm5GxliepneDBVIPQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index 959f8a3..3441cad 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 @@ -96,7 +108,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", @@ -195,8 +211,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1GiikODklVISOurHX37qjA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-09 20:12:47 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2VGOeAn5FFZjaY1G4hCD6A # Use the ItemtypeLocalization view to create the join on localization our $LANGUAGE; 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..212c52b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_12768-update_schema_files.sql @@ -0,0 +1,3 @@ +ALTER TABLE `itemtypes` MODIFY COLUMN `rentalcharge` DECIMAL(28,6) NULL DEFAULT NULL; +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 eb02c95..0c8a23a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -982,7 +982,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.10.2