Bugzilla – Attachment 147622 Details for
Bug 33103
Add vendor aliases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33103: DBIC changes
Bug-33103-DBIC-changes.patch (text/plain), 3.34 KB, created by
Jonathan Druart
on 2023-03-02 14:34:29 UTC
(
hide
)
Description:
Bug 33103: DBIC changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-02 14:34:29 UTC
Size:
3.34 KB
patch
obsolete
>From 83dd944325ab8041116bf6524b2142882edb89ac Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Mar 2023 11:18:12 +0100 >Subject: [PATCH] Bug 33103: DBIC changes > >--- > Koha/Schema/Result/Aqbookseller.pm | 19 ++++- > Koha/Schema/Result/AqbooksellerAlias.pm | 96 +++++++++++++++++++++++++ > 2 files changed, 113 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/AqbooksellerAlias.pm > >diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm >index d277785eb41..c53b93573d8 100644 >--- a/Koha/Schema/Result/Aqbookseller.pm >+++ b/Koha/Schema/Result/Aqbookseller.pm >@@ -289,6 +289,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 aqbookseller_aliases >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::AqbooksellerAlias> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "aqbookseller_aliases", >+ "Koha::Schema::Result::AqbooksellerAlias", >+ { "foreign.vendor_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 aqcontacts > > Type: has_many >@@ -465,8 +480,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-19 09:20:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Xxg454HATZToWE01NY8eJw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-01 10:07:31 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YBiWEJqaEoEzap60SDok+A > > __PACKAGE__->add_columns( > '+active' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/AqbooksellerAlias.pm b/Koha/Schema/Result/AqbooksellerAlias.pm >new file mode 100644 >index 00000000000..fd983336b54 >--- /dev/null >+++ b/Koha/Schema/Result/AqbooksellerAlias.pm >@@ -0,0 +1,96 @@ >+use utf8; >+package Koha::Schema::Result::AqbooksellerAlias; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::AqbooksellerAlias >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<aqbookseller_aliases> >+ >+=cut >+ >+__PACKAGE__->table("aqbookseller_aliases"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+primary key and unique identifier assigned by Koha >+ >+=head2 vendor_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+link to the vendor >+ >+=head2 alias >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+the alias >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "vendor_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "alias", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=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, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-01 10:07:31 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9s3K0S0BfrHLN/V3X9DB1A >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.25.1
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 33103
:
147621
|
147622
|
147623
|
147624
|
147625
|
147626
|
147627
|
147628
|
147629
|
147630
|
147645
|
147646
|
147647
|
147648
|
147649
|
147650
|
147651
|
147652
|
147653
|
147654
|
147827
|
148448
|
148449
|
148450
|
148451
|
148452
|
148453
|
148454
|
148455
|
148456
|
148457
|
148458
|
149414
|
149419
|
149479
|
149480
|
149481
|
149482
|
149483
|
149484
|
149485
|
149486
|
149487
|
149488
|
149489
|
149490
|
149491
|
149606
|
149607
|
149608
|
149609
|
149629
|
149630
|
149788