Bugzilla – Attachment 146411 Details for
Bug 32607
Add record sources CRUD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32607: [DO NOT PUSH] Koha schemas
Bug-32607-DO-NOT-PUSH-Koha-schemas.patch (text/plain), 3.28 KB, created by
Agustín Moyano
on 2023-02-08 22:00:17 UTC
(
hide
)
Description:
Bug 32607: [DO NOT PUSH] Koha schemas
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2023-02-08 22:00:17 UTC
Size:
3.28 KB
patch
obsolete
>From e3018fc049854427501e24cc8b27e51bf93c3466 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Thu, 2 Feb 2023 16:58:33 -0300 >Subject: [PATCH] Bug 32607: [DO NOT PUSH] Koha schemas > >--- > Koha/Schema/Result/Borrower.pm | 19 ++++++- > Koha/Schema/Result/ImportSource.pm | 89 ++++++++++++++++++++++++++++++ > 2 files changed, 106 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/ImportSource.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index c8f4f32dd2..0f4cc7dec2 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1432,6 +1432,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 import_sources >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ImportSource> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "import_sources", >+ "Koha::Schema::Result::ImportSource", >+ { "foreign.patron_id" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 issues > > Type: has_many >@@ -2058,8 +2073,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-10 17:43:30 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5hh2lGCcKclyTnY7KNPkvg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-02 19:57:13 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r0qcdvukaDqrircOTSPcEg > > __PACKAGE__->has_many( > "restrictions", >diff --git a/Koha/Schema/Result/ImportSource.pm b/Koha/Schema/Result/ImportSource.pm >new file mode 100644 >index 0000000000..a902cb0892 >--- /dev/null >+++ b/Koha/Schema/Result/ImportSource.pm >@@ -0,0 +1,89 @@ >+use utf8; >+package Koha::Schema::Result::ImportSource; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ImportSource >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<import_source> >+ >+=cut >+ >+__PACKAGE__->table("import_source"); >+ >+=head1 ACCESSORS >+ >+=head2 import_source_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 name >+ >+ data_type: 'text' >+ is_nullable: 0 >+ >+=head2 patron_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "import_source_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "name", >+ { data_type => "text", is_nullable => 0 }, >+ "patron_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</import_source_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("import_source_id"); >+ >+=head1 RELATIONS >+ >+=head2 patron >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "patron", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "patron_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-02 19:57:13 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oz4padFuRhd33AKaO5hRRQ >+ >+ >+# 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 32607
:
146410
|
146411
|
146412
|
149777
|
149827
|
149828
|
149829
|
154006
|
154007
|
154008
|
154009
|
154010
|
154438
|
155682
|
155683
|
155684
|
155685
|
155686
|
155958
|
157756
|
157757
|
157758
|
157759
|
157760
|
157761
|
157762
|
161362
|
161363
|
161364
|
161365
|
161366
|
161367
|
161435
|
161436
|
161437
|
161438
|
161439
|
161440
|
161441
|
161474