Bugzilla – Attachment 174363 Details for
Bug 34355
Automated MARC record ordering process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34355: DBIC files
Bug-34355-DBIC-files.patch (text/plain), 6.75 KB, created by
Matt Blenkinsop
on 2024-11-11 15:23:55 UTC
(
hide
)
Description:
Bug 34355: DBIC files
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-11-11 15:23:55 UTC
Size:
6.75 KB
patch
obsolete
>From 17e3b76ea0b18c7a826a9dae2e32435523ba7029 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 11 Nov 2024 15:20:39 +0000 >Subject: [PATCH] Bug 34355: DBIC files > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Schema/Result/Aqbookseller.pm | 19 ++- > Koha/Schema/Result/Aqbudget.pm | 19 ++- > Koha/Schema/Result/MarcOrderAccount.pm | 211 +++++++++++++++++++++++++ > 3 files changed, 245 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/MarcOrderAccount.pm > >diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm >index f9ce48cae47..8d38e036741 100644 >--- a/Koha/Schema/Result/Aqbookseller.pm >+++ b/Koha/Schema/Result/Aqbookseller.pm >@@ -494,6 +494,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 marc_order_accounts >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::MarcOrderAccount> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "marc_order_accounts", >+ "Koha::Schema::Result::MarcOrderAccount", >+ { "foreign.vendor_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 vendor_edi_accounts > > Type: has_many >@@ -510,8 +525,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-06-30 09:54:35 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xjeOqpcdN3Kb1wmLGDjzLg >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 11:04:04 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SIwFJFXaOTOGPs2AS27bHQ > > __PACKAGE__->add_columns( > '+active' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/Aqbudget.pm b/Koha/Schema/Result/Aqbudget.pm >index 07612aa149a..f8b66113e14 100644 >--- a/Koha/Schema/Result/Aqbudget.pm >+++ b/Koha/Schema/Result/Aqbudget.pm >@@ -303,6 +303,21 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >+=head2 marc_order_accounts >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::MarcOrderAccount> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "marc_order_accounts", >+ "Koha::Schema::Result::MarcOrderAccount", >+ { "foreign.budget_id" => "self.budget_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 suggestions > > Type: has_many >@@ -344,8 +359,8 @@ Composing rels: L</aqbudgetborrowers> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-04-19 17:02:59 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5solU2GxDRyXxtWgpbcGVQ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 11:04:04 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DCCt9sdoDfla/gzWSQC02Q > > __PACKAGE__->belongs_to( > "budget", >diff --git a/Koha/Schema/Result/MarcOrderAccount.pm b/Koha/Schema/Result/MarcOrderAccount.pm >new file mode 100644 >index 00000000000..faaf9054148 >--- /dev/null >+++ b/Koha/Schema/Result/MarcOrderAccount.pm >@@ -0,0 +1,211 @@ >+use utf8; >+package Koha::Schema::Result::MarcOrderAccount; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::MarcOrderAccount >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<marc_order_accounts> >+ >+=cut >+ >+__PACKAGE__->table("marc_order_accounts"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+unique identifier and primary key >+ >+=head2 description >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 250 >+ >+description of this account >+ >+=head2 vendor_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+vendor id for this account >+ >+=head2 budget_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+budget id for this account >+ >+=head2 download_directory >+ >+ data_type: 'mediumtext' >+ is_nullable: 1 >+ >+download directory for this account >+ >+=head2 matcher_id >+ >+ data_type: 'integer' >+ is_nullable: 1 >+ >+the id of the match rule used (matchpoints.matcher_id) >+ >+=head2 overlay_action >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 50 >+ >+how to handle duplicate records >+ >+=head2 nomatch_action >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 50 >+ >+how to handle records where no match is found >+ >+=head2 item_action >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 50 >+ >+what to do with item records >+ >+=head2 parse_items >+ >+ data_type: 'tinyint' >+ is_nullable: 1 >+ >+should items be parsed >+ >+=head2 record_type >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 50 >+ >+type of record in the file >+ >+=head2 encoding >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 50 >+ >+file encoding >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "description", >+ { data_type => "varchar", is_nullable => 0, size => 250 }, >+ "vendor_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "budget_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "download_directory", >+ { data_type => "mediumtext", is_nullable => 1 }, >+ "matcher_id", >+ { data_type => "integer", is_nullable => 1 }, >+ "overlay_action", >+ { data_type => "varchar", is_nullable => 1, size => 50 }, >+ "nomatch_action", >+ { data_type => "varchar", is_nullable => 1, size => 50 }, >+ "item_action", >+ { data_type => "varchar", is_nullable => 1, size => 50 }, >+ "parse_items", >+ { data_type => "tinyint", is_nullable => 1 }, >+ "record_type", >+ { data_type => "varchar", is_nullable => 1, size => 50 }, >+ "encoding", >+ { data_type => "varchar", is_nullable => 1, size => 50 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=head2 budget >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Aqbudget> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "budget", >+ "Koha::Schema::Result::Aqbudget", >+ { budget_id => "budget_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 vendor >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Aqbookseller> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "vendor", >+ "Koha::Schema::Result::Aqbookseller", >+ { id => "vendor_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 13:01:54 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fz6iYOJIQLrlYvAnmW6C4A >+ >+__PACKAGE__->add_columns( >+ '+parse_items' => { is_boolean => 1 }, >+); >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.39.3 (Apple Git-146)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34355
:
154705
|
154706
|
154707
|
154708
|
154709
|
154710
|
157092
|
157093
|
157094
|
157095
|
157096
|
157097
|
157098
|
157099
|
157100
|
160858
|
160859
|
160860
|
160861
|
160862
|
160863
|
160864
|
160865
|
160866
|
160867
|
160868
|
160869
|
160870
|
160871
|
160872
|
160873
|
160874
|
160875
|
169896
|
169897
|
169898
|
169899
|
169900
|
169901
|
169902
|
169903
|
169904
|
170395
|
170401
|
170402
|
170403
|
170404
|
170405
|
170406
|
170407
|
170408
|
170409
|
173054
|
173055
|
173056
|
173057
|
173058
|
173059
|
173060
|
173061
|
173062
|
173063
|
173064
|
173065
|
173066
|
173709
|
173805
|
173806
|
173809
|
173824
|
173825
|
173993
|
173994
|
173995
|
173996
|
173997
|
173998
|
173999
|
174000
|
174001
|
174002
|
174003
|
174004
|
174005
|
174006
|
174007
|
174008
|
174009
|
174010
|
174362
| 174363 |
174364
|
174365
|
174366
|
174367
|
174368
|
174369
|
174370
|
174371
|
174372
|
174373
|
174374
|
174375
|
174376
|
174377
|
174378
|
174379
|
174380
|
174382
|
174383