From b9da6137af26aae25aa3ad176f6e0118494c7ee6 Mon Sep 17 00:00:00 2001 From: Nicolas Legrand Date: Mon, 13 Jan 2020 17:51:03 +0100 Subject: [PATCH] Bug 24412: Schema file DO NOT PUSH! --- Koha/Schema/Result/Biblio.pm | 19 ++--------------- Koha/Schema/Result/BiblioMetadata.pm | 8 +++---- Koha/Schema/Result/Borrower.pm | 19 ++--------------- Koha/Schema/Result/BorrowerModification.pm | 8 +++---- Koha/Schema/Result/BorrowerRelationship.pm | 15 +++++-------- Koha/Schema/Result/Branch.pm | 19 +++++++++++++++-- Koha/Schema/Result/Club.pm | 19 ++--------------- Koha/Schema/Result/DeletedbiblioMetadata.pm | 8 +++---- Koha/Schema/Result/Desk.pm | 19 +++++++++++++++-- Koha/Schema/Result/Item.pm | 19 ++--------------- Koha/Schema/Result/OldReserve.pm | 11 ++++++++-- Koha/Schema/Result/Reserve.pm | 33 ++++++++++++++++++++--------- Koha/Schema/Result/SearchField.pm | 6 ++---- Koha/Schema/Result/SearchMarcToField.pm | 20 ++++++++--------- 14 files changed, 103 insertions(+), 120 deletions(-) diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 7c66b1d..cea606f 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -240,21 +240,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 club_holds - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "club_holds", - "Koha::Schema::Result::ClubHold", - { "foreign.biblio_id" => "self.biblionumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 hold_fill_targets Type: has_many @@ -406,8 +391,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:otCex8qzJmZyc+JXpKNdpQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0iQjTxpVZpOcW5Sg538tVg __PACKAGE__->has_one( diff --git a/Koha/Schema/Result/BiblioMetadata.pm b/Koha/Schema/Result/BiblioMetadata.pm index aa1a7b2..a2cd6c5 100644 --- a/Koha/Schema/Result/BiblioMetadata.pm +++ b/Koha/Schema/Result/BiblioMetadata.pm @@ -44,7 +44,7 @@ __PACKAGE__->table("biblio_metadata"); =head2 schema data_type: 'varchar' - is_nullable: 0 + is_nullable: 1 size: 16 =head2 metadata @@ -69,7 +69,7 @@ __PACKAGE__->add_columns( "format", { data_type => "varchar", is_nullable => 0, size => 16 }, "schema", - { data_type => "varchar", is_nullable => 0, size => 16 }, + { data_type => "varchar", is_nullable => 1, size => 16 }, "metadata", { data_type => "longtext", is_nullable => 0 }, "timestamp", @@ -132,8 +132,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kyAOIks+HHuiKQvfqxduEg sub koha_object_class { 'Koha::Biblio::Metadata'; diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index f7224cc..546eefc 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -959,21 +959,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 club_holds_to_patron_holds - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "club_holds_to_patron_holds", - "Koha::Schema::Result::ClubHoldsToPatronHold", - { "foreign.patron_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 course_instructors Type: has_many @@ -1635,8 +1620,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-10 14:31:00 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GjJLIOViIFRm185Yjl9vYA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RO82euG+L4bQLR6oIRi3Vw __PACKAGE__->add_columns( '+anonymized' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index 3db708d..8077de2 100644 --- a/Koha/Schema/Result/BorrowerModification.pm +++ b/Koha/Schema/Result/BorrowerModification.pm @@ -40,7 +40,7 @@ __PACKAGE__->table("borrower_modifications"); =head2 changed_fields data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 borrowernumber @@ -434,7 +434,7 @@ __PACKAGE__->add_columns( "verification_token", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, "changed_fields", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "borrowernumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, "cardnumber", @@ -610,8 +610,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-22 16:54:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jkZUTN+mGIdp8ySV0BYNTw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M8mOFapLklUyhFsB5C/SGA sub koha_object_class { 'Koha::Patron::Modification'; diff --git a/Koha/Schema/Result/BorrowerRelationship.pm b/Koha/Schema/Result/BorrowerRelationship.pm index 04a5c10..f683cff 100644 --- a/Koha/Schema/Result/BorrowerRelationship.pm +++ b/Koha/Schema/Result/BorrowerRelationship.pm @@ -33,7 +33,7 @@ __PACKAGE__->table("borrower_relationships"); data_type: 'integer' is_foreign_key: 1 - is_nullable: 1 + is_nullable: 0 =head2 guarantee_id @@ -53,7 +53,7 @@ __PACKAGE__->add_columns( "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "guarantor_id", - { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "guarantee_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "relationship", @@ -117,17 +117,12 @@ __PACKAGE__->belongs_to( "guarantor", "Koha::Schema::Result::Borrower", { borrowernumber => "guarantor_id" }, - { - is_deferrable => 1, - join_type => "LEFT", - on_delete => "CASCADE", - on_update => "CASCADE", - }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-20 15:14:37 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZymvWAn9Nzfuh1lExUIhIg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:icrt6W9Wnyn69FkiuHJOuw sub koha_objects_class { 'Koha::Patron::Relationships'; diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index 6680195..94d18fb 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -511,6 +511,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 desks + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "desks", + "Koha::Schema::Result::Desk", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 edifact_eans Type: has_many @@ -737,8 +752,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-12-26 10:51:35 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vxx2lpU/W6cC5muhVAO1jw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hyy3nL4nZJpAWz/ah3dJFw __PACKAGE__->add_columns( '+pickup_location' => { is_boolean => 1 } diff --git a/Koha/Schema/Result/Club.pm b/Koha/Schema/Result/Club.pm index 7710a75..98daa3f 100644 --- a/Koha/Schema/Result/Club.pm +++ b/Koha/Schema/Result/Club.pm @@ -173,21 +173,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 club_holds - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "club_holds", - "Koha::Schema::Result::ClubHold", - { "foreign.club_id" => "self.id" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 club_template Type: belongs_to @@ -204,8 +189,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WbB7PSSU4xaszsKe9Eacqw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WqSnfMI5Y1zPi7Z3JEuSlQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DeletedbiblioMetadata.pm b/Koha/Schema/Result/DeletedbiblioMetadata.pm index 17406b9..e8cdfcd 100644 --- a/Koha/Schema/Result/DeletedbiblioMetadata.pm +++ b/Koha/Schema/Result/DeletedbiblioMetadata.pm @@ -44,7 +44,7 @@ __PACKAGE__->table("deletedbiblio_metadata"); =head2 schema data_type: 'varchar' - is_nullable: 0 + is_nullable: 1 size: 16 =head2 metadata @@ -69,7 +69,7 @@ __PACKAGE__->add_columns( "format", { data_type => "varchar", is_nullable => 0, size => 16 }, "schema", - { data_type => "varchar", is_nullable => 0, size => 16 }, + { data_type => "varchar", is_nullable => 1, size => 16 }, "metadata", { data_type => "longtext", is_nullable => 0 }, "timestamp", @@ -132,8 +132,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JCOh+FSSTgPlC8lMJOdOOA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qP9OS+Amaz2DUzVovmFlww # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Desk.pm b/Koha/Schema/Result/Desk.pm index a72be1b..ee04730 100644 --- a/Koha/Schema/Result/Desk.pm +++ b/Koha/Schema/Result/Desk.pm @@ -83,9 +83,24 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 reserves -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-10-02 13:43:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IklOycKlChqv9Tftm8rjqA +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "reserves", + "Koha::Schema::Result::Reserve", + { "foreign.desk_id" => "self.desk_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FoGr/XGcK5TtSzNXMTeztg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index ba860f7..28bcbd0 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -511,21 +511,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 club_holds - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "club_holds", - "Koha::Schema::Result::ClubHold", - { "foreign.item_id" => "self.itemnumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 course_item Type: might_have @@ -747,8 +732,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-10 14:31:00 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dqUjo9pJysKKBhF8PM5KnA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TG6+EeydsShEv/i/TOSZ6A __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm index de9fc6c..e4727dd 100644 --- a/Koha/Schema/Result/OldReserve.pm +++ b/Koha/Schema/Result/OldReserve.pm @@ -52,6 +52,11 @@ __PACKAGE__->table("old_reserves"); is_nullable: 1 size: 10 +=head2 desk_id + + data_type: 'integer' + is_nullable: 1 + =head2 notificationdate data_type: 'date' @@ -156,6 +161,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "branchcode", { data_type => "varchar", is_nullable => 1, size => 10 }, + "desk_id", + { data_type => "integer", is_nullable => 1 }, "notificationdate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reminderdate", @@ -297,8 +304,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZgGAW7ODBby3hGNJ41eeMA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VZT39Jk3uI53AuH45vYCxw sub koha_object_class { 'Koha::Old::Hold'; diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm index 3a56d68..86f9485 100644 --- a/Koha/Schema/Result/Reserve.pm +++ b/Koha/Schema/Result/Reserve.pm @@ -56,6 +56,12 @@ __PACKAGE__->table("reserves"); is_nullable: 1 size: 10 +=head2 desk_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + =head2 notificationdate data_type: 'date' @@ -170,6 +176,8 @@ __PACKAGE__->add_columns( }, "branchcode", { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + "desk_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "notificationdate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reminderdate", @@ -280,19 +288,24 @@ __PACKAGE__->belongs_to( }, ); -=head2 club_holds_to_patron_holds +=head2 desk -Type: has_many +Type: belongs_to -Related object: L +Related object: L =cut -__PACKAGE__->has_many( - "club_holds_to_patron_holds", - "Koha::Schema::Result::ClubHoldsToPatronHold", - { "foreign.hold_id" => "self.reserve_id" }, - { cascade_copy => 0, cascade_delete => 0 }, +__PACKAGE__->belongs_to( + "desk", + "Koha::Schema::Result::Desk", + { desk_id => "desk_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 itemnumber @@ -336,8 +349,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pc5zh5iFbdwko5KS51Y9Uw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bstyVXeSdyVRrszvKoY8Ow __PACKAGE__->belongs_to( "item", diff --git a/Koha/Schema/Result/SearchField.pm b/Koha/Schema/Result/SearchField.pm index 540d984..1b865fb 100644 --- a/Koha/Schema/Result/SearchField.pm +++ b/Koha/Schema/Result/SearchField.pm @@ -64,8 +64,6 @@ what type of data this holds, relevant when storing it in the search engine data_type: 'tinyint' is_nullable: 1 -the order place of the field in facet list if faceted - =head2 staff_client data_type: 'tinyint' @@ -149,8 +147,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-02 12:47:22 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EbUa4eprgxeUkoOUiXO/Cg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hT3LpnNmDmKGyT9v/jpbjg __PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map"); diff --git a/Koha/Schema/Result/SearchMarcToField.pm b/Koha/Schema/Result/SearchMarcToField.pm index 0108016..cc05299 100644 --- a/Koha/Schema/Result/SearchMarcToField.pm +++ b/Koha/Schema/Result/SearchMarcToField.pm @@ -23,12 +23,6 @@ __PACKAGE__->table("search_marc_to_field"); =head1 ACCESSORS -=head2 search - - data_type: 'tinyint' - default_value: 1 - is_nullable: 0 - =head2 search_marc_map_id data_type: 'integer' @@ -64,11 +58,15 @@ true if this field can be used to generate suggestions for browse true/false creates special sort handling, null doesn't +=head2 search + + data_type: 'tinyint' + default_value: 1 + is_nullable: 0 + =cut __PACKAGE__->add_columns( - "search", - { data_type => "tinyint", default_value => 1, is_nullable => 0 }, "search_marc_map_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "search_field_id", @@ -79,6 +77,8 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 1 }, "sort", { data_type => "tinyint", is_nullable => 1 }, + "search", + { data_type => "tinyint", default_value => 1, is_nullable => 0 }, ); =head1 PRIMARY KEY @@ -128,8 +128,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-02 12:47:22 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9mqZ/zrii+Fv+k+eQNHYUw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2020-01-10 16:02:56 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QBWMT6sHJw3YfpT+VxIu6g # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.1.4