From eb86fb8c1b84547ef9908b296e4f5a8632295951 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 18 Jun 2013 13:14:43 -0400 Subject: [PATCH] Bug 8798 - Add the use of DBIx::Class - Followup - Update schema files Signed-off-by: Chris Cormack --- Koha/Schema/Result/Aqbasket.pm | 20 +- Koha/Schema/Result/Aqbasketgroup.pm | 20 +- Koha/Schema/Result/Aqorder.pm | 73 ++- Koha/Schema/Result/AqordersItem.pm | 24 +- Koha/Schema/Result/AuthorisedValue.pm | 21 +- Koha/Schema/Result/AuthorisedValuesBranch.pm | 82 +++ Koha/Schema/Result/Borrower.pm | 31 +- Koha/Schema/Result/BorrowerAttributeType.pm | 23 +- Koha/Schema/Result/BorrowerAttributeTypesBranch.pm | 83 +++ Koha/Schema/Result/BorrowerModification.pm | 554 +++++++++++++++++++++ Koha/Schema/Result/Branch.pm | 64 ++- Koha/Schema/Result/Branchcategory.pm | 12 +- Koha/Schema/Result/CategoriesBranch.pm | 83 +++ Koha/Schema/Result/Category.pm | 34 +- Koha/Schema/Result/City.pm | 16 +- Koha/Schema/Result/Course.pm | 162 ++++++ Koha/Schema/Result/CourseInstructor.pm | 82 +++ Koha/Schema/Result/CourseItem.pm | 142 ++++++ Koha/Schema/Result/CourseReserve.pm | 101 ++++ Koha/Schema/Result/Deletedbiblio.pm | 8 +- Koha/Schema/Result/Deletedborrower.pm | 26 +- Koha/Schema/Result/Deleteditem.pm | 12 +- Koha/Schema/Result/ImportBatch.pm | 26 +- Koha/Schema/Result/Issue.pm | 16 +- Koha/Schema/Result/Issuingrule.pm | 18 +- Koha/Schema/Result/Item.pm | 27 +- Koha/Schema/Result/Linktracker.pm | 77 +++ Koha/Schema/Result/OldReserve.pm | 11 +- Koha/Schema/Result/PendingOfflineOperation.pm | 16 +- Koha/Schema/Result/PluginData.pm | 57 +++ Koha/Schema/Result/Reserve.pm | 11 +- Koha/Schema/Result/Serial.pm | 11 +- Koha/Schema/Result/Subscription.pm | 34 +- Koha/Schema/Result/Suggestion.pm | 8 +- Koha/Schema/Result/TagAll.pm | 24 +- Koha/Schema/Result/TagsIndex.pm | 24 +- Koha/Schema/Result/Virtualshelfcontent.pm | 34 +- 37 files changed, 1873 insertions(+), 194 deletions(-) create mode 100644 Koha/Schema/Result/AuthorisedValuesBranch.pm create mode 100644 Koha/Schema/Result/BorrowerAttributeTypesBranch.pm create mode 100644 Koha/Schema/Result/BorrowerModification.pm create mode 100644 Koha/Schema/Result/CategoriesBranch.pm create mode 100644 Koha/Schema/Result/Course.pm create mode 100644 Koha/Schema/Result/CourseInstructor.pm create mode 100644 Koha/Schema/Result/CourseItem.pm create mode 100644 Koha/Schema/Result/CourseReserve.pm create mode 100644 Koha/Schema/Result/Linktracker.pm create mode 100644 Koha/Schema/Result/PluginData.pm diff --git a/Koha/Schema/Result/Aqbasket.pm b/Koha/Schema/Result/Aqbasket.pm index 74b2e29..e53abe9 100644 --- a/Koha/Schema/Result/Aqbasket.pm +++ b/Koha/Schema/Result/Aqbasket.pm @@ -81,6 +81,18 @@ __PACKAGE__->table("aqbasket"); is_foreign_key: 1 is_nullable: 1 +=head2 deliveryplace + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 billingplace + + data_type: 'varchar' + is_nullable: 1 + size: 10 + =cut __PACKAGE__->add_columns( @@ -111,6 +123,10 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "basketgroupid", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "deliveryplace", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "billingplace", + { data_type => "varchar", is_nullable => 1, size => 10 }, ); __PACKAGE__->set_primary_key("basketno"); @@ -177,8 +193,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eRG3p93qKZhp3rNPwG60Ig +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dtVubmNVtOouPnHgut95og # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbasketgroup.pm b/Koha/Schema/Result/Aqbasketgroup.pm index 76c8d6f..d591ac3 100644 --- a/Koha/Schema/Result/Aqbasketgroup.pm +++ b/Koha/Schema/Result/Aqbasketgroup.pm @@ -42,12 +42,6 @@ __PACKAGE__->table("aqbasketgroups"); is_foreign_key: 1 is_nullable: 0 -=head2 billingplace - - data_type: 'varchar' - is_nullable: 1 - size: 10 - =head2 deliveryplace data_type: 'varchar' @@ -65,6 +59,12 @@ __PACKAGE__->table("aqbasketgroups"); is_nullable: 1 size: 255 +=head2 billingplace + + data_type: 'varchar' + is_nullable: 1 + size: 10 + =cut __PACKAGE__->add_columns( @@ -76,14 +76,14 @@ __PACKAGE__->add_columns( { data_type => "tinyint", is_nullable => 1 }, "booksellerid", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, - "billingplace", - { data_type => "varchar", is_nullable => 1, size => 10 }, "deliveryplace", { data_type => "varchar", is_nullable => 1, size => 10 }, "freedeliveryplace", { data_type => "text", is_nullable => 1 }, "deliverycomment", { data_type => "varchar", is_nullable => 1, size => 255 }, + "billingplace", + { data_type => "varchar", is_nullable => 1, size => 10 }, ); __PACKAGE__->set_primary_key("id"); @@ -120,8 +120,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sxuJyGpPeqNxjNAnAAe69A +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fm4sF0IGJYdSejZIB4uoBQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm index 3a48c55..7204b75 100644 --- a/Koha/Schema/Result/Aqorder.pm +++ b/Koha/Schema/Result/Aqorder.pm @@ -114,17 +114,6 @@ __PACKAGE__->table("aqorders"); data_type: 'mediumtext' is_nullable: 1 -=head2 subscription - - data_type: 'tinyint' - is_nullable: 1 - -=head2 serialid - - data_type: 'varchar' - is_nullable: 1 - size: 30 - =head2 basketno data_type: 'integer' @@ -154,11 +143,17 @@ __PACKAGE__->table("aqorders"); is_nullable: 1 size: [13,2] -=head2 gst +=head2 gstrate data_type: 'decimal' is_nullable: 1 - size: [13,2] + size: [6,4] + +=head2 discount + + data_type: 'float' + is_nullable: 1 + size: [6,4] =head2 budget_id @@ -215,6 +210,12 @@ __PACKAGE__->table("aqorders"); data_type: 'date' is_nullable: 1 +=head2 subscriptionid + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + =head2 parent_ordernumber data_type: 'integer' @@ -257,10 +258,6 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "purchaseordernumber", { data_type => "mediumtext", is_nullable => 1 }, - "subscription", - { data_type => "tinyint", is_nullable => 1 }, - "serialid", - { data_type => "varchar", is_nullable => 1, size => 30 }, "basketno", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "biblioitemnumber", @@ -275,8 +272,10 @@ __PACKAGE__->add_columns( { data_type => "decimal", is_nullable => 1, size => [13, 2] }, "ecost", { data_type => "decimal", is_nullable => 1, size => [13, 2] }, - "gst", - { data_type => "decimal", is_nullable => 1, size => [13, 2] }, + "gstrate", + { data_type => "decimal", is_nullable => 1, size => [6, 4] }, + "discount", + { data_type => "float", is_nullable => 1, size => [6, 4] }, "budget_id", { data_type => "integer", is_nullable => 0 }, "budgetgroup_id", @@ -297,6 +296,8 @@ __PACKAGE__->add_columns( { data_type => "integer", default_value => 0, is_nullable => 1 }, "claimed_date", { data_type => "date", is_nullable => 1 }, + "subscriptionid", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "parent_ordernumber", { data_type => "integer", is_nullable => 1 }, ); @@ -349,9 +350,39 @@ __PACKAGE__->belongs_to( { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 subscriptionid + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "subscriptionid", + "Koha::Schema::Result::Subscription", + { subscriptionid => "subscriptionid" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 aqorders_items + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqorders_items", + "Koha::Schema::Result::AqordersItem", + { "foreign.ordernumber" => "self.ordernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:McWqeFHBMTDvKV7pUEqJ3w +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H1fME9Sli2LWh6zAmpzK8A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AqordersItem.pm b/Koha/Schema/Result/AqordersItem.pm index 50cc3d3..c434105 100644 --- a/Koha/Schema/Result/AqordersItem.pm +++ b/Koha/Schema/Result/AqordersItem.pm @@ -22,6 +22,7 @@ __PACKAGE__->table("aqorders_items"); =head2 ordernumber data_type: 'integer' + is_foreign_key: 1 is_nullable: 0 =head2 itemnumber @@ -39,7 +40,7 @@ __PACKAGE__->table("aqorders_items"); __PACKAGE__->add_columns( "ordernumber", - { data_type => "integer", is_nullable => 0 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "itemnumber", { data_type => "integer", is_nullable => 0 }, "timestamp", @@ -51,9 +52,26 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key("itemnumber"); +=head1 RELATIONS + +=head2 ordernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "ordernumber", + "Koha::Schema::Result::Aqorder", + { ordernumber => "ordernumber" }, + { on_delete => "CASCADE", on_update => "CASCADE" }, +); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OlihytSmp6fCmG/hAT7FEg +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9KFzTfBzan4H1BxT1suyXA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthorisedValue.pm b/Koha/Schema/Result/AuthorisedValue.pm index 1c47e5b..3e71f33 100644 --- a/Koha/Schema/Result/AuthorisedValue.pm +++ b/Koha/Schema/Result/AuthorisedValue.pm @@ -75,9 +75,26 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key("id"); +=head1 RELATIONS -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GpXi5gcFBtEj82hEFzhmVg +=head2 authorised_values_branches + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "authorised_values_branches", + "Koha::Schema::Result::AuthorisedValuesBranch", + { "foreign.av_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UQnP1vJKTnc7KwuTT20Orw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthorisedValuesBranch.pm b/Koha/Schema/Result/AuthorisedValuesBranch.pm new file mode 100644 index 0000000..1d81c4b --- /dev/null +++ b/Koha/Schema/Result/AuthorisedValuesBranch.pm @@ -0,0 +1,82 @@ +package Koha::Schema::Result::AuthorisedValuesBranch; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::AuthorisedValuesBranch + +=cut + +__PACKAGE__->table("authorised_values_branches"); + +=head1 ACCESSORS + +=head2 av_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +=head2 branchcode + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 1 + size: 10 + +=cut + +__PACKAGE__->add_columns( + "av_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "branchcode", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, +); + +=head1 RELATIONS + +=head2 av + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "av", + "Koha::Schema::Result::AuthorisedValue", + { id => "av_id" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 branchcode + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yPaKXjOzZX76bddoMqxKmA + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index 1d38b53..2b700bf 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -85,7 +85,7 @@ __PACKAGE__->table("borrowers"); =head2 state - data_type: 'mediumtext' + data_type: 'text' is_nullable: 1 =head2 zipcode @@ -160,7 +160,7 @@ __PACKAGE__->table("borrowers"); =head2 b_state - data_type: 'mediumtext' + data_type: 'text' is_nullable: 1 =head2 b_zipcode @@ -357,7 +357,7 @@ __PACKAGE__->table("borrowers"); =head2 altcontactstate - data_type: 'mediumtext' + data_type: 'text' is_nullable: 1 =head2 altcontactzipcode @@ -417,7 +417,7 @@ __PACKAGE__->add_columns( "city", { data_type => "mediumtext", is_nullable => 0 }, "state", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "zipcode", { data_type => "varchar", is_nullable => 1, size => 25 }, "country", @@ -445,7 +445,7 @@ __PACKAGE__->add_columns( "b_city", { data_type => "mediumtext", is_nullable => 1 }, "b_state", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "b_zipcode", { data_type => "varchar", is_nullable => 1, size => 25 }, "b_country", @@ -527,7 +527,7 @@ __PACKAGE__->add_columns( "altcontactaddress3", { data_type => "varchar", is_nullable => 1, size => 255 }, "altcontactstate", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "altcontactzipcode", { data_type => "varchar", is_nullable => 1, size => 50 }, "altcontactcountry", @@ -664,6 +664,21 @@ __PACKAGE__->belongs_to( { on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 course_instructors + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "course_instructors", + "Koha::Schema::Result::CourseInstructor", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 creator_batches Type: has_many @@ -935,8 +950,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a5PYhuHX3DHlNJqdmIuqTw +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RZG8l5yFKXZzsAY8CenNeA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm index 2be37f1..94e96f3 100644 --- a/Koha/Schema/Result/BorrowerAttributeType.pm +++ b/Koha/Schema/Result/BorrowerAttributeType.pm @@ -76,7 +76,6 @@ __PACKAGE__->table("borrower_attribute_types"); =head2 category_code data_type: 'varchar' - is_foreign_key: 1 is_nullable: 1 size: 10 @@ -109,7 +108,7 @@ __PACKAGE__->add_columns( "display_checkout", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "category_code", - { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 10 }, "class", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, ); @@ -117,19 +116,19 @@ __PACKAGE__->set_primary_key("code"); =head1 RELATIONS -=head2 category_code +=head2 borrower_attribute_types_branches -Type: belongs_to +Type: has_many -Related object: L +Related object: L =cut -__PACKAGE__->belongs_to( - "category_code", - "Koha::Schema::Result::Category", - { categorycode => "category_code" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +__PACKAGE__->has_many( + "borrower_attribute_types_branches", + "Koha::Schema::Result::BorrowerAttributeTypesBranch", + { "foreign.bat_code" => "self.code" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_attributes @@ -148,8 +147,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EpdavGdH3uR/eaNLJIoHCg +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vwni0x6JLQPsjX8UOSnr4Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm b/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm new file mode 100644 index 0000000..e867b8c --- /dev/null +++ b/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm @@ -0,0 +1,83 @@ +package Koha::Schema::Result::BorrowerAttributeTypesBranch; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::BorrowerAttributeTypesBranch + +=cut + +__PACKAGE__->table("borrower_attribute_types_branches"); + +=head1 ACCESSORS + +=head2 bat_code + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 1 + size: 10 + +=head2 b_branchcode + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 1 + size: 10 + +=cut + +__PACKAGE__->add_columns( + "bat_code", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + "b_branchcode", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, +); + +=head1 RELATIONS + +=head2 bat_code + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "bat_code", + "Koha::Schema::Result::BorrowerAttributeType", + { code => "bat_code" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 b_branchcode + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "b_branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "b_branchcode" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z/zsaV00AbPzi/YfCh+cwA + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm new file mode 100644 index 0000000..4b65a16 --- /dev/null +++ b/Koha/Schema/Result/BorrowerModification.pm @@ -0,0 +1,554 @@ +package Koha::Schema::Result::BorrowerModification; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::BorrowerModification + +=cut + +__PACKAGE__->table("borrower_modifications"); + +=head1 ACCESSORS + +=head2 timestamp + + data_type: 'timestamp' + default_value: current_timestamp + is_nullable: 0 + +=head2 verification_token + + data_type: 'varchar' + default_value: (empty string) + is_nullable: 0 + size: 255 + +=head2 borrowernumber + + data_type: 'integer' + default_value: 0 + is_nullable: 0 + +=head2 cardnumber + + data_type: 'varchar' + is_nullable: 1 + size: 16 + +=head2 surname + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 firstname + + data_type: 'text' + is_nullable: 1 + +=head2 title + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 othernames + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 initials + + data_type: 'text' + is_nullable: 1 + +=head2 streetnumber + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 streettype + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 address + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 address2 + + data_type: 'text' + is_nullable: 1 + +=head2 city + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 state + + data_type: 'text' + is_nullable: 1 + +=head2 zipcode + + data_type: 'varchar' + is_nullable: 1 + size: 25 + +=head2 country + + data_type: 'text' + is_nullable: 1 + +=head2 email + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 phone + + data_type: 'text' + is_nullable: 1 + +=head2 mobile + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 fax + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 emailpro + + data_type: 'text' + is_nullable: 1 + +=head2 phonepro + + data_type: 'text' + is_nullable: 1 + +=head2 b_streetnumber + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 b_streettype + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 b_address + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 b_address2 + + data_type: 'text' + is_nullable: 1 + +=head2 b_city + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 b_state + + data_type: 'text' + is_nullable: 1 + +=head2 b_zipcode + + data_type: 'varchar' + is_nullable: 1 + size: 25 + +=head2 b_country + + data_type: 'text' + is_nullable: 1 + +=head2 b_email + + data_type: 'text' + is_nullable: 1 + +=head2 b_phone + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 dateofbirth + + data_type: 'date' + is_nullable: 1 + +=head2 branchcode + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 categorycode + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 dateenrolled + + data_type: 'date' + is_nullable: 1 + +=head2 dateexpiry + + data_type: 'date' + is_nullable: 1 + +=head2 gonenoaddress + + data_type: 'tinyint' + is_nullable: 1 + +=head2 lost + + data_type: 'tinyint' + is_nullable: 1 + +=head2 debarred + + data_type: 'date' + is_nullable: 1 + +=head2 debarredcomment + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 contactname + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 contactfirstname + + data_type: 'text' + is_nullable: 1 + +=head2 contacttitle + + data_type: 'text' + is_nullable: 1 + +=head2 guarantorid + + data_type: 'integer' + is_nullable: 1 + +=head2 borrowernotes + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 relationship + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 ethnicity + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 ethnotes + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 sex + + data_type: 'varchar' + is_nullable: 1 + size: 1 + +=head2 password + + data_type: 'varchar' + is_nullable: 1 + size: 30 + +=head2 flags + + data_type: 'integer' + is_nullable: 1 + +=head2 userid + + data_type: 'varchar' + is_nullable: 1 + size: 75 + +=head2 opacnote + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 contactnote + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 sort1 + + data_type: 'varchar' + is_nullable: 1 + size: 80 + +=head2 sort2 + + data_type: 'varchar' + is_nullable: 1 + size: 80 + +=head2 altcontactfirstname + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 altcontactsurname + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 altcontactaddress1 + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 altcontactaddress2 + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 altcontactaddress3 + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 altcontactstate + + data_type: 'text' + is_nullable: 1 + +=head2 altcontactzipcode + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 altcontactcountry + + data_type: 'text' + is_nullable: 1 + +=head2 altcontactphone + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 smsalertnumber + + data_type: 'varchar' + is_nullable: 1 + size: 50 + +=head2 privacy + + data_type: 'integer' + is_nullable: 1 + +=cut + +__PACKAGE__->add_columns( + "timestamp", + { + data_type => "timestamp", + default_value => \"current_timestamp", + is_nullable => 0, + }, + "verification_token", + { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, + "borrowernumber", + { data_type => "integer", default_value => 0, is_nullable => 0 }, + "cardnumber", + { data_type => "varchar", is_nullable => 1, size => 16 }, + "surname", + { data_type => "mediumtext", is_nullable => 1 }, + "firstname", + { data_type => "text", is_nullable => 1 }, + "title", + { data_type => "mediumtext", is_nullable => 1 }, + "othernames", + { data_type => "mediumtext", is_nullable => 1 }, + "initials", + { data_type => "text", is_nullable => 1 }, + "streetnumber", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "streettype", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "address", + { data_type => "mediumtext", is_nullable => 1 }, + "address2", + { data_type => "text", is_nullable => 1 }, + "city", + { data_type => "mediumtext", is_nullable => 1 }, + "state", + { data_type => "text", is_nullable => 1 }, + "zipcode", + { data_type => "varchar", is_nullable => 1, size => 25 }, + "country", + { data_type => "text", is_nullable => 1 }, + "email", + { data_type => "mediumtext", is_nullable => 1 }, + "phone", + { data_type => "text", is_nullable => 1 }, + "mobile", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "fax", + { data_type => "mediumtext", is_nullable => 1 }, + "emailpro", + { data_type => "text", is_nullable => 1 }, + "phonepro", + { data_type => "text", is_nullable => 1 }, + "b_streetnumber", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "b_streettype", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "b_address", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "b_address2", + { data_type => "text", is_nullable => 1 }, + "b_city", + { data_type => "mediumtext", is_nullable => 1 }, + "b_state", + { data_type => "text", is_nullable => 1 }, + "b_zipcode", + { data_type => "varchar", is_nullable => 1, size => 25 }, + "b_country", + { data_type => "text", is_nullable => 1 }, + "b_email", + { data_type => "text", is_nullable => 1 }, + "b_phone", + { data_type => "mediumtext", is_nullable => 1 }, + "dateofbirth", + { data_type => "date", is_nullable => 1 }, + "branchcode", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "categorycode", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "dateenrolled", + { data_type => "date", is_nullable => 1 }, + "dateexpiry", + { data_type => "date", is_nullable => 1 }, + "gonenoaddress", + { data_type => "tinyint", is_nullable => 1 }, + "lost", + { data_type => "tinyint", is_nullable => 1 }, + "debarred", + { data_type => "date", is_nullable => 1 }, + "debarredcomment", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "contactname", + { data_type => "mediumtext", is_nullable => 1 }, + "contactfirstname", + { data_type => "text", is_nullable => 1 }, + "contacttitle", + { data_type => "text", is_nullable => 1 }, + "guarantorid", + { data_type => "integer", is_nullable => 1 }, + "borrowernotes", + { data_type => "mediumtext", is_nullable => 1 }, + "relationship", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "ethnicity", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "ethnotes", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "sex", + { data_type => "varchar", is_nullable => 1, size => 1 }, + "password", + { data_type => "varchar", is_nullable => 1, size => 30 }, + "flags", + { data_type => "integer", is_nullable => 1 }, + "userid", + { data_type => "varchar", is_nullable => 1, size => 75 }, + "opacnote", + { data_type => "mediumtext", is_nullable => 1 }, + "contactnote", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "sort1", + { data_type => "varchar", is_nullable => 1, size => 80 }, + "sort2", + { data_type => "varchar", is_nullable => 1, size => 80 }, + "altcontactfirstname", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "altcontactsurname", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "altcontactaddress1", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "altcontactaddress2", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "altcontactaddress3", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "altcontactstate", + { data_type => "text", is_nullable => 1 }, + "altcontactzipcode", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "altcontactcountry", + { data_type => "text", is_nullable => 1 }, + "altcontactphone", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "smsalertnumber", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "privacy", + { data_type => "integer", is_nullable => 1 }, +); +__PACKAGE__->set_primary_key("verification_token", "borrowernumber"); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F50fjkEjqHuyl7zaEDV+3A + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index d6958d0..1542325 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -158,6 +158,36 @@ __PACKAGE__->set_primary_key("branchcode"); =head1 RELATIONS +=head2 authorised_values_branches + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "authorised_values_branches", + "Koha::Schema::Result::AuthorisedValuesBranch", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 borrower_attribute_types_branches + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "borrower_attribute_types_branches", + "Koha::Schema::Result::BorrowerAttributeTypesBranch", + { "foreign.b_branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 borrowers Type: has_many @@ -248,6 +278,36 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 categories_branches + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "categories_branches", + "Koha::Schema::Result::CategoriesBranch", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 course_items + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "course_items", + "Koha::Schema::Result::CourseItem", + { "foreign.holdingbranch" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 creator_batches Type: has_many @@ -369,8 +429,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7/fUACQhSXHg0daDi6MGbQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BS/6xtFAoMSKsXho4IXXjQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Branchcategory.pm b/Koha/Schema/Result/Branchcategory.pm index 7538dfa..592a1d7 100644 --- a/Koha/Schema/Result/Branchcategory.pm +++ b/Koha/Schema/Result/Branchcategory.pm @@ -43,6 +43,12 @@ __PACKAGE__->table("branchcategories"); is_nullable: 1 size: 16 +=head2 show_in_pulldown + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + =cut __PACKAGE__->add_columns( @@ -54,6 +60,8 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "categorytype", { data_type => "varchar", is_nullable => 1, size => 16 }, + "show_in_pulldown", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); __PACKAGE__->set_primary_key("categorycode"); @@ -75,8 +83,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:i3um3oAfQ9EV/pJHuUiWnA +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VkvImio07fpqmHCntPn5+w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CategoriesBranch.pm b/Koha/Schema/Result/CategoriesBranch.pm new file mode 100644 index 0000000..756d014 --- /dev/null +++ b/Koha/Schema/Result/CategoriesBranch.pm @@ -0,0 +1,83 @@ +package Koha::Schema::Result::CategoriesBranch; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::CategoriesBranch + +=cut + +__PACKAGE__->table("categories_branches"); + +=head1 ACCESSORS + +=head2 categorycode + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 1 + size: 10 + +=head2 branchcode + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 1 + size: 10 + +=cut + +__PACKAGE__->add_columns( + "categorycode", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + "branchcode", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, +); + +=head1 RELATIONS + +=head2 categorycode + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "categorycode", + "Koha::Schema::Result::Category", + { categorycode => "categorycode" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 branchcode + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SVolMqOZ2fpkPdSCSjpDUA + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/Category.pm b/Koha/Schema/Result/Category.pm index ef75e3d..7b61cb3 100644 --- a/Koha/Schema/Result/Category.pm +++ b/Koha/Schema/Result/Category.pm @@ -133,21 +133,6 @@ __PACKAGE__->set_primary_key("categorycode"); =head1 RELATIONS -=head2 borrower_attribute_types - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "borrower_attribute_types", - "Koha::Schema::Result::BorrowerAttributeType", - { "foreign.category_code" => "self.categorycode" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 borrower_message_preferences Type: has_many @@ -193,6 +178,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 categories_branches + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "categories_branches", + "Koha::Schema::Result::CategoriesBranch", + { "foreign.categorycode" => "self.categorycode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 default_borrower_circ_rule Type: might_have @@ -209,8 +209,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BpTckQJaDAxGwrOS9s3tuQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rQnbpUtXD6tNSnSGpowcaw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/City.pm b/Koha/Schema/Result/City.pm index 921e48d..4174602 100644 --- a/Koha/Schema/Result/City.pm +++ b/Koha/Schema/Result/City.pm @@ -38,17 +38,17 @@ __PACKAGE__->table("cities"); is_nullable: 1 size: 100 -=head2 city_zipcode +=head2 city_country data_type: 'varchar' is_nullable: 1 - size: 20 + size: 100 -=head2 city_country +=head2 city_zipcode data_type: 'varchar' is_nullable: 1 - size: 100 + size: 20 =cut @@ -59,16 +59,16 @@ __PACKAGE__->add_columns( { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 }, "city_state", { data_type => "varchar", is_nullable => 1, size => 100 }, - "city_zipcode", - { data_type => "varchar", is_nullable => 1, size => 20 }, "city_country", { data_type => "varchar", is_nullable => 1, size => 100 }, + "city_zipcode", + { data_type => "varchar", is_nullable => 1, size => 20 }, ); __PACKAGE__->set_primary_key("cityid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rm0FlpZ/rA6OLY0TP/RMTQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ziAiH8vvSS8OzKHZBcpUow # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Course.pm b/Koha/Schema/Result/Course.pm new file mode 100644 index 0000000..91615f0 --- /dev/null +++ b/Koha/Schema/Result/Course.pm @@ -0,0 +1,162 @@ +package Koha::Schema::Result::Course; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::Course + +=cut + +__PACKAGE__->table("courses"); + +=head1 ACCESSORS + +=head2 course_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 department + + data_type: 'varchar' + is_nullable: 1 + size: 20 + +=head2 course_number + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 section + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 course_name + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 term + + data_type: 'varchar' + is_nullable: 1 + size: 20 + +=head2 staff_note + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 public_note + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 students_count + + data_type: 'varchar' + is_nullable: 1 + size: 20 + +=head2 enabled + + data_type: 'enum' + default_value: 'yes' + extra: {list => ["yes","no"]} + is_nullable: 0 + +=head2 timestamp + + data_type: 'timestamp' + default_value: current_timestamp + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "course_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "department", + { data_type => "varchar", is_nullable => 1, size => 20 }, + "course_number", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "section", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "course_name", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "term", + { data_type => "varchar", is_nullable => 1, size => 20 }, + "staff_note", + { data_type => "mediumtext", is_nullable => 1 }, + "public_note", + { data_type => "mediumtext", is_nullable => 1 }, + "students_count", + { data_type => "varchar", is_nullable => 1, size => 20 }, + "enabled", + { + data_type => "enum", + default_value => "yes", + extra => { list => ["yes", "no"] }, + is_nullable => 0, + }, + "timestamp", + { + data_type => "timestamp", + default_value => \"current_timestamp", + is_nullable => 0, + }, +); +__PACKAGE__->set_primary_key("course_id"); + +=head1 RELATIONS + +=head2 course_instructors + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "course_instructors", + "Koha::Schema::Result::CourseInstructor", + { "foreign.course_id" => "self.course_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 course_reserves + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "course_reserves", + "Koha::Schema::Result::CourseReserve", + { "foreign.course_id" => "self.course_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SN5SfQi+SbfPr069wck64w + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/CourseInstructor.pm b/Koha/Schema/Result/CourseInstructor.pm new file mode 100644 index 0000000..6f38227 --- /dev/null +++ b/Koha/Schema/Result/CourseInstructor.pm @@ -0,0 +1,82 @@ +package Koha::Schema::Result::CourseInstructor; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::CourseInstructor + +=cut + +__PACKAGE__->table("course_instructors"); + +=head1 ACCESSORS + +=head2 course_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +=head2 borrowernumber + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "course_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "borrowernumber", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, +); +__PACKAGE__->set_primary_key("course_id", "borrowernumber"); + +=head1 RELATIONS + +=head2 course + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "course", + "Koha::Schema::Result::Course", + { course_id => "course_id" }, + { on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zPwefIbI2Pz0pX03KpS1eQ + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm new file mode 100644 index 0000000..5a59bd8 --- /dev/null +++ b/Koha/Schema/Result/CourseItem.pm @@ -0,0 +1,142 @@ +package Koha::Schema::Result::CourseItem; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::CourseItem + +=cut + +__PACKAGE__->table("course_items"); + +=head1 ACCESSORS + +=head2 ci_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 itemnumber + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +=head2 itype + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 ccode + + data_type: 'varchar' + is_nullable: 1 + size: 10 + +=head2 holdingbranch + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 1 + size: 10 + +=head2 location + + data_type: 'varchar' + is_nullable: 1 + size: 80 + +=head2 enabled + + data_type: 'enum' + default_value: 'no' + extra: {list => ["yes","no"]} + is_nullable: 0 + +=head2 timestamp + + data_type: 'timestamp' + default_value: current_timestamp + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "ci_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "itemnumber", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "itype", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "ccode", + { data_type => "varchar", is_nullable => 1, size => 10 }, + "holdingbranch", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + "location", + { data_type => "varchar", is_nullable => 1, size => 80 }, + "enabled", + { + data_type => "enum", + default_value => "no", + extra => { list => ["yes", "no"] }, + is_nullable => 0, + }, + "timestamp", + { + data_type => "timestamp", + default_value => \"current_timestamp", + is_nullable => 0, + }, +); +__PACKAGE__->set_primary_key("ci_id"); +__PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]); + +=head1 RELATIONS + +=head2 holdingbranch + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "holdingbranch", + "Koha::Schema::Result::Branch", + { branchcode => "holdingbranch" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 itemnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "itemnumber", + "Koha::Schema::Result::Item", + { itemnumber => "itemnumber" }, + { on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BAqW3ImuEzBoIMWAeM12qA + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/CourseReserve.pm b/Koha/Schema/Result/CourseReserve.pm new file mode 100644 index 0000000..607046a --- /dev/null +++ b/Koha/Schema/Result/CourseReserve.pm @@ -0,0 +1,101 @@ +package Koha::Schema::Result::CourseReserve; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::CourseReserve + +=cut + +__PACKAGE__->table("course_reserves"); + +=head1 ACCESSORS + +=head2 cr_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 course_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +=head2 ci_id + + data_type: 'integer' + is_nullable: 0 + +=head2 staff_note + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 public_note + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 timestamp + + data_type: 'timestamp' + default_value: current_timestamp + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "cr_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "course_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "ci_id", + { data_type => "integer", is_nullable => 0 }, + "staff_note", + { data_type => "mediumtext", is_nullable => 1 }, + "public_note", + { data_type => "mediumtext", is_nullable => 1 }, + "timestamp", + { + data_type => "timestamp", + default_value => \"current_timestamp", + is_nullable => 0, + }, +); +__PACKAGE__->set_primary_key("cr_id"); +__PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]); + +=head1 RELATIONS + +=head2 course + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "course", + "Koha::Schema::Result::Course", + { course_id => "course_id" }, + { on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LUZRTXuhywezgITcSqqDJQ + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/Deletedbiblio.pm b/Koha/Schema/Result/Deletedbiblio.pm index 9bdcd69..d41dfaf 100644 --- a/Koha/Schema/Result/Deletedbiblio.pm +++ b/Koha/Schema/Result/Deletedbiblio.pm @@ -22,7 +22,7 @@ __PACKAGE__->table("deletedbiblio"); =head2 biblionumber data_type: 'integer' - default_value: 0 + is_auto_increment: 1 is_nullable: 0 =head2 frameworkcode @@ -87,7 +87,7 @@ __PACKAGE__->table("deletedbiblio"); __PACKAGE__->add_columns( "biblionumber", - { data_type => "integer", default_value => 0, is_nullable => 0 }, + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "frameworkcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, "author", @@ -118,8 +118,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("biblionumber"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/x/M9xGCkN5ClHrk1GUELw +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NeMRnyT+TXPaypKdluD7BQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm index 8d430cb..8a38a5d 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -85,7 +85,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 state - data_type: 'mediumtext' + data_type: 'text' is_nullable: 1 =head2 zipcode @@ -160,7 +160,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 b_state - data_type: 'mediumtext' + data_type: 'text' is_nullable: 1 =head2 b_zipcode @@ -199,7 +199,8 @@ __PACKAGE__->table("deletedborrowers"); =head2 categorycode data_type: 'varchar' - is_nullable: 1 + default_value: (empty string) + is_nullable: 0 size: 10 =head2 dateenrolled @@ -354,7 +355,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 altcontactstate - data_type: 'mediumtext' + data_type: 'text' is_nullable: 1 =head2 altcontactzipcode @@ -383,7 +384,8 @@ __PACKAGE__->table("deletedborrowers"); =head2 privacy data_type: 'integer' - is_nullable: 1 + default_value: 1 + is_nullable: 0 =cut @@ -413,7 +415,7 @@ __PACKAGE__->add_columns( "city", { data_type => "mediumtext", is_nullable => 0 }, "state", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "zipcode", { data_type => "varchar", is_nullable => 1, size => 25 }, "country", @@ -441,7 +443,7 @@ __PACKAGE__->add_columns( "b_city", { data_type => "mediumtext", is_nullable => 1 }, "b_state", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "b_zipcode", { data_type => "varchar", is_nullable => 1, size => 25 }, "b_country", @@ -455,7 +457,7 @@ __PACKAGE__->add_columns( "branchcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "categorycode", - { data_type => "varchar", is_nullable => 1, size => 10 }, + { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "dateenrolled", { data_type => "date", is_nullable => 1 }, "dateexpiry", @@ -511,7 +513,7 @@ __PACKAGE__->add_columns( "altcontactaddress3", { data_type => "varchar", is_nullable => 1, size => 255 }, "altcontactstate", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "text", is_nullable => 1 }, "altcontactzipcode", { data_type => "varchar", is_nullable => 1, size => 50 }, "altcontactcountry", @@ -521,12 +523,12 @@ __PACKAGE__->add_columns( "smsalertnumber", { data_type => "varchar", is_nullable => 1, size => 50 }, "privacy", - { data_type => "integer", is_nullable => 1 }, + { data_type => "integer", default_value => 1, is_nullable => 0 }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bFluvx9OwGTzEMpQZPBuKQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1D2zAd8OsHXZ2s9cEVevug # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index a37f0c3..13ffa66 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -121,6 +121,12 @@ __PACKAGE__->table("deleteditems"); is_nullable: 1 size: 255 +=head2 coded_location_qualifier + + data_type: 'varchar' + is_nullable: 1 + size: 10 + =head2 issues data_type: 'smallint' @@ -282,6 +288,8 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "itemcallnumber", { data_type => "varchar", is_nullable => 1, size => 255 }, + "coded_location_qualifier", + { data_type => "varchar", is_nullable => 1, size => 10 }, "issues", { data_type => "smallint", is_nullable => 1 }, "renewals", @@ -334,8 +342,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:71VE1YzdzK7dAtGTVKeCkg +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dQeILHSwObg9anjIGL+5vA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportBatch.pm b/Koha/Schema/Result/ImportBatch.pm index 2ccec3e..14ee242 100644 --- a/Koha/Schema/Result/ImportBatch.pm +++ b/Koha/Schema/Result/ImportBatch.pm @@ -94,6 +94,13 @@ __PACKAGE__->table("import_batches"); extra: {list => ["batch","z3950","webservice"]} is_nullable: 0 +=head2 record_type + + data_type: 'enum' + default_value: 'biblio' + extra: {list => ["biblio","auth","holdings"]} + is_nullable: 0 + =head2 file_name data_type: 'varchar' @@ -105,13 +112,6 @@ __PACKAGE__->table("import_batches"); data_type: 'mediumtext' is_nullable: 1 -=head2 record_type - - data_type: 'enum' - default_value: 'biblio' - extra: {list => ["biblio","auth","holdings"]} - is_nullable: 0 - =cut __PACKAGE__->add_columns( @@ -185,10 +185,6 @@ __PACKAGE__->add_columns( extra => { list => ["batch", "z3950", "webservice"] }, is_nullable => 0, }, - "file_name", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "comments", - { data_type => "mediumtext", is_nullable => 1 }, "record_type", { data_type => "enum", @@ -196,6 +192,10 @@ __PACKAGE__->add_columns( extra => { list => ["biblio", "auth", "holdings"] }, is_nullable => 0, }, + "file_name", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "comments", + { data_type => "mediumtext", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("import_batch_id"); @@ -217,8 +217,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:es2clfR8Vlgv8rN/kM65iA +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LUl8GuPahmUwYeaGAKBJxw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index ebbe7a0..d10a338 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -23,13 +23,13 @@ __PACKAGE__->table("issues"); data_type: 'integer' is_foreign_key: 1 - is_nullable: 0 + is_nullable: 1 =head2 itemnumber data_type: 'integer' is_foreign_key: 1 - is_nullable: 0 + is_nullable: 1 =head2 date_due @@ -84,9 +84,9 @@ __PACKAGE__->table("issues"); __PACKAGE__->add_columns( "borrowernumber", - { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "itemnumber", - { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "date_due", { data_type => "datetime", is_nullable => 1 }, "branchcode", @@ -125,7 +125,7 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 itemnumber @@ -140,12 +140,12 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KCy3FmbJK9aZRqXSAkYe5g +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uZUDWDGWOkC3oCOyMaG1sg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm index 6d3dbd0..57323e5 100644 --- a/Koha/Schema/Result/Issuingrule.pm +++ b/Koha/Schema/Result/Issuingrule.pm @@ -116,12 +116,22 @@ __PACKAGE__->table("issuingrules"); default_value: 0 is_nullable: 0 +=head2 renewalperiod + + data_type: 'integer' + is_nullable: 1 + =head2 reservesallowed data_type: 'smallint' default_value: 0 is_nullable: 0 +=head2 holdspickupdelay + + data_type: 'integer' + is_nullable: 1 + =head2 branchcode data_type: 'varchar' @@ -176,8 +186,12 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "renewalsallowed", { data_type => "smallint", default_value => 0, is_nullable => 0 }, + "renewalperiod", + { data_type => "integer", is_nullable => 1 }, "reservesallowed", { data_type => "smallint", default_value => 0, is_nullable => 0 }, + "holdspickupdelay", + { data_type => "integer", is_nullable => 1 }, "branchcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "overduefinescap", @@ -186,8 +200,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bsTUaL5I872EWP0ZLfdPQA +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:odTb6vtz4DignNIlYwkNEg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 13d4d7f..69edbe6 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -123,6 +123,12 @@ __PACKAGE__->table("items"); is_nullable: 1 size: 255 +=head2 coded_location_qualifier + + data_type: 'varchar' + is_nullable: 1 + size: 10 + =head2 issues data_type: 'smallint' @@ -284,6 +290,8 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "itemcallnumber", { data_type => "varchar", is_nullable => 1, size => 255 }, + "coded_location_qualifier", + { data_type => "varchar", is_nullable => 1, size => 10 }, "issues", { data_type => "smallint", is_nullable => 1 }, "renewals", @@ -366,6 +374,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 course_item + +Type: might_have + +Related object: L + +=cut + +__PACKAGE__->might_have( + "course_item", + "Koha::Schema::Result::CourseItem", + { "foreign.itemnumber" => "self.itemnumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 creator_batches Type: has_many @@ -517,8 +540,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+jjodrPqX4WhBbgnTc5OqQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f3HngbnArIKegakzHgcFBg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Linktracker.pm b/Koha/Schema/Result/Linktracker.pm new file mode 100644 index 0000000..2b272f2 --- /dev/null +++ b/Koha/Schema/Result/Linktracker.pm @@ -0,0 +1,77 @@ +package Koha::Schema::Result::Linktracker; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::Linktracker + +=cut + +__PACKAGE__->table("linktracker"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 biblionumber + + data_type: 'integer' + is_nullable: 1 + +=head2 itemnumber + + data_type: 'integer' + is_nullable: 1 + +=head2 borrowernumber + + data_type: 'integer' + is_nullable: 1 + +=head2 url + + data_type: 'text' + is_nullable: 1 + +=head2 timeclicked + + data_type: 'datetime' + is_nullable: 1 + +=cut + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "biblionumber", + { data_type => "integer", is_nullable => 1 }, + "itemnumber", + { data_type => "integer", is_nullable => 1 }, + "borrowernumber", + { data_type => "integer", is_nullable => 1 }, + "url", + { data_type => "text", is_nullable => 1 }, + "timeclicked", + { data_type => "datetime", is_nullable => 1 }, +); +__PACKAGE__->set_primary_key("id"); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6e2s/DzzRjvXXrusUC4TZg + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm index 20493af..384dbf3 100644 --- a/Koha/Schema/Result/OldReserve.pm +++ b/Koha/Schema/Result/OldReserve.pm @@ -122,6 +122,11 @@ __PACKAGE__->table("old_reserves"); data_type: 'datetime' is_nullable: 1 +=head2 maxpickupdate + + data_type: 'date' + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -167,6 +172,8 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "suspend_until", { data_type => "datetime", is_nullable => 1 }, + "maxpickupdate", + { data_type => "date", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("reserve_id"); @@ -218,8 +225,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1b1FcIuOJ5ZRU2apc6swkQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ni1RNxdeOoypM+GwYu1vAQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PendingOfflineOperation.pm b/Koha/Schema/Result/PendingOfflineOperation.pm index 3f4f552..b5ba9c7 100644 --- a/Koha/Schema/Result/PendingOfflineOperation.pm +++ b/Koha/Schema/Result/PendingOfflineOperation.pm @@ -52,7 +52,7 @@ __PACKAGE__->table("pending_offline_operations"); =head2 barcode data_type: 'varchar' - is_nullable: 0 + is_nullable: 1 size: 20 =head2 cardnumber @@ -61,6 +61,12 @@ __PACKAGE__->table("pending_offline_operations"); is_nullable: 1 size: 16 +=head2 amount + + data_type: 'decimal' + is_nullable: 1 + size: [28,6] + =cut __PACKAGE__->add_columns( @@ -79,15 +85,17 @@ __PACKAGE__->add_columns( "action", { data_type => "varchar", is_nullable => 0, size => 10 }, "barcode", - { data_type => "varchar", is_nullable => 0, size => 20 }, + { data_type => "varchar", is_nullable => 1, size => 20 }, "cardnumber", { data_type => "varchar", is_nullable => 1, size => 16 }, + "amount", + { data_type => "decimal", is_nullable => 1, size => [28, 6] }, ); __PACKAGE__->set_primary_key("operationid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PFEH3bfCYOG8Q3dOX/IQ5w +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ECj0ps97NmZowYLZv++zbA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PluginData.pm b/Koha/Schema/Result/PluginData.pm new file mode 100644 index 0000000..9e5dcab --- /dev/null +++ b/Koha/Schema/Result/PluginData.pm @@ -0,0 +1,57 @@ +package Koha::Schema::Result::PluginData; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + + +=head1 NAME + +Koha::Schema::Result::PluginData + +=cut + +__PACKAGE__->table("plugin_data"); + +=head1 ACCESSORS + +=head2 plugin_class + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 plugin_key + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 plugin_value + + data_type: 'text' + is_nullable: 1 + +=cut + +__PACKAGE__->add_columns( + "plugin_class", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "plugin_key", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "plugin_value", + { data_type => "text", is_nullable => 1 }, +); +__PACKAGE__->set_primary_key("plugin_class", "plugin_key"); + + +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XC9EptLCJK8QWBHGy1TnPw + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm index 6a1f886..b85f8f8 100644 --- a/Koha/Schema/Result/Reserve.pm +++ b/Koha/Schema/Result/Reserve.pm @@ -126,6 +126,11 @@ __PACKAGE__->table("reserves"); data_type: 'datetime' is_nullable: 1 +=head2 maxpickupdate + + data_type: 'date' + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -181,6 +186,8 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "suspend_until", { data_type => "datetime", is_nullable => 1 }, + "maxpickupdate", + { data_type => "date", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("reserve_id"); @@ -247,8 +254,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+8kr13IjL7oHVHRXQzTReA +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RqJFYCoDl4dMH1cwZilLKA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Serial.pm b/Koha/Schema/Result/Serial.pm index b184e07..7284ed2 100644 --- a/Koha/Schema/Result/Serial.pm +++ b/Koha/Schema/Result/Serial.pm @@ -67,11 +67,6 @@ __PACKAGE__->table("serial"); data_type: 'date' is_nullable: 1 -=head2 itemnumber - - data_type: 'text' - is_nullable: 1 - =head2 claimdate data_type: 'date' @@ -101,8 +96,6 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "publisheddate", { data_type => "date", is_nullable => 1 }, - "itemnumber", - { data_type => "text", is_nullable => 1 }, "claimdate", { data_type => "date", is_nullable => 1 }, "routingnotes", @@ -128,8 +121,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PqzibMlED9bg0uOONSBnmg +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6kL+JePSa/pT8Fvyrp2xow # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Subscription.pm b/Koha/Schema/Result/Subscription.pm index de6c426..752f8ba 100644 --- a/Koha/Schema/Result/Subscription.pm +++ b/Koha/Schema/Result/Subscription.pm @@ -317,6 +317,17 @@ __PACKAGE__->table("subscription"); data_type: 'date' is_nullable: 1 +=head2 closed + + data_type: 'integer' + default_value: 0 + is_nullable: 0 + +=head2 reneweddate + + data_type: 'date' + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -422,11 +433,30 @@ __PACKAGE__->add_columns( { data_type => "integer", default_value => 0, is_nullable => 0 }, "enddate", { data_type => "date", is_nullable => 1 }, + "closed", + { data_type => "integer", default_value => 0, is_nullable => 0 }, + "reneweddate", + { data_type => "date", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("subscriptionid"); =head1 RELATIONS +=head2 aqorders + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqorders", + "Koha::Schema::Result::Aqorder", + { "foreign.subscriptionid" => "self.subscriptionid" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 subscriptionroutinglists Type: has_many @@ -443,8 +473,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V94nwW1uwvdVX634/QPe6A +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dNaDbtGiAeSsPKEu2vd9sw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm index f95a14c..638bf94 100644 --- a/Koha/Schema/Result/Suggestion.pm +++ b/Koha/Schema/Result/Suggestion.pm @@ -89,7 +89,7 @@ __PACKAGE__->table("suggestions"); data_type: 'varchar' is_nullable: 1 - size: 80 + size: 255 =head2 copyrightdate @@ -226,7 +226,7 @@ __PACKAGE__->add_columns( "author", { data_type => "varchar", is_nullable => 1, size => 80 }, "title", - { data_type => "varchar", is_nullable => 1, size => 80 }, + { data_type => "varchar", is_nullable => 1, size => 255 }, "copyrightdate", { data_type => "smallint", is_nullable => 1 }, "publishercode", @@ -273,8 +273,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("suggestionid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yseojs5ogx6ZmYsbhE03Gw +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FCZjU1DjqLCAcw+dSjpP/w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TagAll.pm b/Koha/Schema/Result/TagAll.pm index af448fd..efeb2f3 100644 --- a/Koha/Schema/Result/TagAll.pm +++ b/Koha/Schema/Result/TagAll.pm @@ -73,39 +73,39 @@ __PACKAGE__->set_primary_key("tag_id"); =head1 RELATIONS -=head2 biblionumber +=head2 borrowernumber Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "biblionumber", - "Koha::Schema::Result::Biblio", - { biblionumber => "biblionumber" }, + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, { on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 borrowernumber +=head2 biblionumber Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, + "biblionumber", + "Koha::Schema::Result::Biblio", + { biblionumber => "biblionumber" }, { on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xdc0YzmHsXuuuUWfa1aRpg +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SunUKfsdQ6hNupUkD2ygzw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TagsIndex.pm b/Koha/Schema/Result/TagsIndex.pm index f289b4c..af08b8c 100644 --- a/Koha/Schema/Result/TagsIndex.pm +++ b/Koha/Schema/Result/TagsIndex.pm @@ -52,39 +52,39 @@ __PACKAGE__->set_primary_key("term", "biblionumber"); =head1 RELATIONS -=head2 biblionumber +=head2 term Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "biblionumber", - "Koha::Schema::Result::Biblio", - { biblionumber => "biblionumber" }, + "term", + "Koha::Schema::Result::TagsApproval", + { term => "term" }, { on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 term +=head2 biblionumber Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "term", - "Koha::Schema::Result::TagsApproval", - { term => "term" }, + "biblionumber", + "Koha::Schema::Result::Biblio", + { biblionumber => "biblionumber" }, { on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BTw4FJK85g85U1U0RELiQQ +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X0OvXQjDYLVCMgHHWx/kpw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Virtualshelfcontent.pm b/Koha/Schema/Result/Virtualshelfcontent.pm index e1f2e9c..f1f35c3 100644 --- a/Koha/Schema/Result/Virtualshelfcontent.pm +++ b/Koha/Schema/Result/Virtualshelfcontent.pm @@ -81,6 +81,21 @@ __PACKAGE__->add_columns( =head1 RELATIONS +=head2 shelfnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "shelfnumber", + "Koha::Schema::Result::Virtualshelve", + { shelfnumber => "shelfnumber" }, + { on_delete => "CASCADE", on_update => "CASCADE" }, +); + =head2 biblionumber Type: belongs_to @@ -111,24 +126,9 @@ __PACKAGE__->belongs_to( { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 shelfnumber - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "shelfnumber", - "Koha::Schema::Result::Virtualshelve", - { shelfnumber => "shelfnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); - -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LytHu3VzJUfDRLgSsRHy1Q +# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Hno59ucoCC6fZqGi1A2yIA # You can replace this text with custom content, and it will be preserved on regeneration -- 1.8.1.2