From 03c85f64c353eba07fb2eda475f534b31a85b8f0 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 6 Jan 2016 14:56:06 +0000 Subject: [PATCH] Revert "Bug 15478 - Update the remaining schema files that do not match the db schema" This reverts commit 4f6b4a3a57044af2f847a4e7a40d9f7987d3f337. --- Koha/Schema/Result/Item.pm | 19 +------ Koha/Schema/Result/Overduerule.pm | 33 +++--------- .../Result/OverduerulesTransportType.pm | 50 +++++++++++++++---- Koha/Schema/Result/Serial.pm | 28 ++++++++++- 4 files changed, 76 insertions(+), 54 deletions(-) diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index c370d868ce..cd74bfb8e7 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -555,21 +555,6 @@ __PACKAGE__->might_have( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 items_last_borrower - -Type: might_have - -Related object: L - -=cut - -__PACKAGE__->might_have( - "items_last_borrower", - "Koha::Schema::Result::ItemsLastBorrower", - { "foreign.itemnumber" => "self.itemnumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 old_issues Type: has_many @@ -631,8 +616,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-06 12:00:28 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3M6BvB4ATsBXgQCkFKuI3A +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-11-04 12:00:58 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jkgJfulDrGaUpQ6jC40vpQ __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/Overduerule.pm b/Koha/Schema/Result/Overduerule.pm index 1d248ed394..8392d1a9e0 100644 --- a/Koha/Schema/Result/Overduerule.pm +++ b/Koha/Schema/Result/Overduerule.pm @@ -23,12 +23,6 @@ __PACKAGE__->table("overduerules"); =head1 ACCESSORS -=head2 overduerules_id - - data_type: 'integer' - is_auto_increment: 1 - is_nullable: 0 - =head2 branchcode data_type: 'varchar' @@ -99,8 +93,6 @@ __PACKAGE__->table("overduerules"); =cut __PACKAGE__->add_columns( - "overduerules_id", - { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "branchcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "categorycode", @@ -129,20 +121,6 @@ __PACKAGE__->add_columns( =over 4 -=item * L - -=back - -=cut - -__PACKAGE__->set_primary_key("overduerules_id"); - -=head1 UNIQUE CONSTRAINTS - -=head2 C - -=over 4 - =item * L =item * L @@ -151,7 +129,7 @@ __PACKAGE__->set_primary_key("overduerules_id"); =cut -__PACKAGE__->add_unique_constraint("overduerules_branch_cat", ["branchcode", "categorycode"]); +__PACKAGE__->set_primary_key("branchcode", "categorycode"); =head1 RELATIONS @@ -166,13 +144,16 @@ Related object: L __PACKAGE__->has_many( "overduerules_transport_types", "Koha::Schema::Result::OverduerulesTransportType", - { "foreign.overduerules_id" => "self.overduerules_id" }, + { + "foreign.branchcode" => "self.branchcode", + "foreign.categorycode" => "self.categorycode", + }, { cascade_copy => 0, cascade_delete => 0 }, ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-06 12:00:28 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Opfa1YZ3IeQRRbyrbKAkNQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-02 18:04:32 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zQK4gTxkrPPwJzujbZxxdg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OverduerulesTransportType.pm b/Koha/Schema/Result/OverduerulesTransportType.pm index b412df8935..d93f32c7ba 100644 --- a/Koha/Schema/Result/OverduerulesTransportType.pm +++ b/Koha/Schema/Result/OverduerulesTransportType.pm @@ -29,25 +29,59 @@ __PACKAGE__->table("overduerules_transport_types"); is_auto_increment: 1 is_nullable: 0 -=head2 message_transport_type +=head2 branchcode data_type: 'varchar' - default_value: 'email' + default_value: (empty string) is_foreign_key: 1 is_nullable: 0 - size: 20 + size: 10 + +=head2 categorycode -=head2 overduerules_id + data_type: 'varchar' + default_value: (empty string) + is_foreign_key: 1 + is_nullable: 0 + size: 10 + +=head2 letternumber data_type: 'integer' + default_value: 1 + is_nullable: 0 + +=head2 message_transport_type + + data_type: 'varchar' + default_value: 'email' is_foreign_key: 1 is_nullable: 0 + size: 20 =cut __PACKAGE__->add_columns( "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "branchcode", + { + data_type => "varchar", + default_value => "", + is_foreign_key => 1, + is_nullable => 0, + size => 10, + }, + "categorycode", + { + data_type => "varchar", + default_value => "", + is_foreign_key => 1, + is_nullable => 0, + size => 10, + }, + "letternumber", + { data_type => "integer", default_value => 1, is_nullable => 0 }, "message_transport_type", { data_type => "varchar", @@ -56,8 +90,6 @@ __PACKAGE__->add_columns( is_nullable => 0, size => 20, }, - "overduerules_id", - { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); =head1 PRIMARY KEY @@ -100,13 +132,13 @@ Related object: L __PACKAGE__->belongs_to( "overduerule", "Koha::Schema::Result::Overduerule", - { overduerules_id => "overduerules_id" }, + { branchcode => "branchcode", categorycode => "categorycode" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-06 12:00:28 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KYpSfCfzkLxRYI2pQY5Htg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-02 18:04:32 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mNvLssJ8h9WFNQaB+YCGYg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Serial.pm b/Koha/Schema/Result/Serial.pm index d777626fc5..059270c787 100644 --- a/Koha/Schema/Result/Serial.pm +++ b/Koha/Schema/Result/Serial.pm @@ -50,6 +50,24 @@ __PACKAGE__->table("serial"); is_nullable: 0 size: 100 +=head2 serialseq_x + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 serialseq_y + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 serialseq_z + + data_type: 'varchar' + is_nullable: 1 + size: 100 + =head2 status data_type: 'tinyint' @@ -107,6 +125,12 @@ __PACKAGE__->add_columns( { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 }, "serialseq", { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 }, + "serialseq_x", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "serialseq_y", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "serialseq_z", + { data_type => "varchar", is_nullable => 1, size => 100 }, "status", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "planneddate", @@ -155,8 +179,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-06 12:00:28 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gzIArotxwioI0xaXtwMINw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-31 11:56:58 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nJ8tcbP/wWWbIic0hSUmBA # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.39.5