Bugzilla – Attachment 154009 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), 4.17 KB, created by
Agustín Moyano
on 2023-07-27 23:23:54 UTC
(
hide
)
Description:
Bug 32607: [DO NOT PUSH] Koha schemas
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2023-07-27 23:23:54 UTC
Size:
4.17 KB
patch
obsolete
>From 167c0f7b17ef7a36594541aeb353630b4a67ec1d Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Thu, 27 Jul 2023 23:01:40 +0000 >Subject: [PATCH] Bug 32607: [DO NOT PUSH] Koha schemas > >--- > Koha/Schema/Result/Borrower.pm | 34 +++++++-------- > .../{ImportSource.pm => RecordSource.pm} | 43 +++++-------------- > 2 files changed, 27 insertions(+), 50 deletions(-) > rename Koha/Schema/Result/{ImportSource.pm => RecordSource.pm} (61%) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 656f33f566..e6d78158c2 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1432,21 +1432,6 @@ __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 >@@ -1717,6 +1702,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 record_sources >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::RecordSource> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "record_sources", >+ "Koha::Schema::Result::RecordSource", >+ { "foreign.patron_id" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 reserves > > Type: has_many >@@ -2118,8 +2118,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-04-06 15:46:57 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f6omVb7EtiysdaWTX3IRzg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-27 20:42:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozXW5ny1kN3YQGJUEiqg9A > > __PACKAGE__->has_many( > "restrictions", >diff --git a/Koha/Schema/Result/ImportSource.pm b/Koha/Schema/Result/RecordSource.pm >similarity index 61% >rename from Koha/Schema/Result/ImportSource.pm >rename to Koha/Schema/Result/RecordSource.pm >index fa44d0a526..4847fbb075 100644 >--- a/Koha/Schema/Result/ImportSource.pm >+++ b/Koha/Schema/Result/RecordSource.pm >@@ -1,12 +1,12 @@ > use utf8; >-package Koha::Schema::Result::ImportSource; >+package Koha::Schema::Result::RecordSource; > > # Created by DBIx::Class::Schema::Loader > # DO NOT MODIFY THE FIRST PART OF THIS FILE > > =head1 NAME > >-Koha::Schema::Result::ImportSource >+Koha::Schema::Result::RecordSource > > =cut > >@@ -15,15 +15,15 @@ use warnings; > > use base 'DBIx::Class::Core'; > >-=head1 TABLE: C<import_source> >+=head1 TABLE: C<record_sources> > > =cut > >-__PACKAGE__->table("import_source"); >+__PACKAGE__->table("record_sources"); > > =head1 ACCESSORS > >-=head2 import_source_id >+=head2 record_source_id > > data_type: 'integer' > is_auto_increment: 1 >@@ -43,7 +43,7 @@ __PACKAGE__->table("import_source"); > =cut > > __PACKAGE__->add_columns( >- "import_source_id", >+ "record_source_id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "name", > { data_type => "text", is_nullable => 0 }, >@@ -55,13 +55,13 @@ __PACKAGE__->add_columns( > > =over 4 > >-=item * L</import_source_id> >+=item * L</record_source_id> > > =back > > =cut > >-__PACKAGE__->set_primary_key("import_source_id"); >+__PACKAGE__->set_primary_key("record_source_id"); > > =head1 RELATIONS > >@@ -81,32 +81,9 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-02 19:57:13 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oz4padFuRhd33AKaO5hRRQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-27 20:42:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m9dw0dxca5lW/2nUE4HLxQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >- >-=head1 CUSTOM CODE >- >-=head2 koha_object_class >- >-name of the corresponding Koha::Object >- >-=cut >- >-sub koha_object_class { >- 'Koha::ImportSource'; >-} >- >-=head2 koha_objects_class >- >-name of the corresponding Koha::Objects >- >-=cut >- >-sub koha_objects_class { >- 'Koha::ImportSources'; >-} >- > 1; >-- >2.30.2
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