@@ -, +, @@ schema files --- C4/Circulation.pm | 3 +-- Koha/Schema/Result/Issue.pm | 24 ++++++++++++++++++++++-- Koha/Schema/Result/OldIssue.pm | 24 ++++++++++++++++++++++-- 3 files changed, 45 insertions(+), 6 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -3809,8 +3809,7 @@ sub AnonymizeItemIssueHistory { } if ( $oi && $oi->borrower()->privacy() == 2 ) { - $oi->set_column( 'borrowernumber', $a ); - $oi->update(); + $oi->update( { 'borrowernumber' => $a } ); } } --- a/Koha/Schema/Result/Issue.pm +++ a/Koha/Schema/Result/Issue.pm @@ -23,6 +23,12 @@ __PACKAGE__->table("issues"); =head1 ACCESSORS +=head2 issue_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + =head2 borrowernumber data_type: 'integer' @@ -92,6 +98,8 @@ __PACKAGE__->table("issues"); =cut __PACKAGE__->add_columns( + "issue_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "itemnumber", @@ -137,6 +145,18 @@ __PACKAGE__->add_columns( }, ); +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("issue_id"); + =head1 RELATIONS =head2 borrowernumber @@ -180,8 +200,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2SJJ3az4Ml9hKEQvNH3+Kw +# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-21 11:04:23 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:edKldSv9Wx8jFrfA7jfTnw __PACKAGE__->belongs_to( "borrower", --- a/Koha/Schema/Result/OldIssue.pm +++ a/Koha/Schema/Result/OldIssue.pm @@ -23,6 +23,12 @@ __PACKAGE__->table("old_issues"); =head1 ACCESSORS +=head2 issue_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + =head2 borrowernumber data_type: 'integer' @@ -92,6 +98,8 @@ __PACKAGE__->table("old_issues"); =cut __PACKAGE__->add_columns( + "issue_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "itemnumber", @@ -137,6 +145,18 @@ __PACKAGE__->add_columns( }, ); +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("issue_id"); + =head1 RELATIONS =head2 borrowernumber @@ -180,8 +200,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sgsDHihVYHrTycbaqoGbaQ +# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-21 11:04:23 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:i+abQcASmLxXKsJPwJCcjQ __PACKAGE__->belongs_to( "borrower", --