Bugzilla – Attachment 107881 Details for
Bug 25905
REST API: create endpoint for importing OAI-PMH records from external OAI-PMH clients
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25905: DBIx::Class files
Bug-25905-DBIxClass-files.patch (text/plain), 4.43 KB, created by
David Cook
on 2020-08-06 12:29:09 UTC
(
hide
)
Description:
Bug 25905: DBIx::Class files
Filename:
MIME Type:
Creator:
David Cook
Created:
2020-08-06 12:29:09 UTC
Size:
4.43 KB
patch
obsolete
>From efa021bd7036211cac1e8af62833682b6c1790a9 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 6 Aug 2020 08:22:05 +0000 >Subject: [PATCH] Bug 25905: DBIx::Class files > >--- > Koha/Schema/Result/Biblio.pm | 19 +++- > Koha/Schema/Result/ImportOaipmhBiblio.pm | 156 +++++++++++++++++++++++++++++++ > 2 files changed, 173 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/ImportOaipmhBiblio.pm > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 806faf87ad..d3223ca77f 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -270,6 +270,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 import_oaipmh_biblios >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ImportOaipmhBiblio> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "import_oaipmh_biblios", >+ "Koha::Schema::Result::ImportOaipmhBiblio", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 items > > Type: has_many >@@ -451,8 +466,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p2SIq565zPyE3ZUkSuXyBA >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-08-06 08:19:43 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BggBWoQoZp+mFi8TakXiCA > > > __PACKAGE__->has_one( >diff --git a/Koha/Schema/Result/ImportOaipmhBiblio.pm b/Koha/Schema/Result/ImportOaipmhBiblio.pm >new file mode 100644 >index 0000000000..e06b7de3b2 >--- /dev/null >+++ b/Koha/Schema/Result/ImportOaipmhBiblio.pm >@@ -0,0 +1,156 @@ >+use utf8; >+package Koha::Schema::Result::ImportOaipmhBiblio; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ImportOaipmhBiblio >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<import_oaipmh_biblios> >+ >+=cut >+ >+__PACKAGE__->table("import_oaipmh_biblios"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ extra: {unsigned => 1} >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 repository >+ >+ data_type: 'mediumtext' >+ is_nullable: 0 >+ >+=head2 identifier >+ >+ data_type: 'mediumtext' >+ is_nullable: 0 >+ >+=head2 datestamp >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 0 >+ >+=head2 deleted >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 1 >+ >+=head2 metadata >+ >+ data_type: 'longtext' >+ is_nullable: 0 >+ >+=head2 frameworkcode >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 4 >+ >+=head2 biblionumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+=head2 last_modified >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { >+ data_type => "integer", >+ extra => { unsigned => 1 }, >+ is_auto_increment => 1, >+ is_nullable => 0, >+ }, >+ "repository", >+ { data_type => "mediumtext", is_nullable => 0 }, >+ "identifier", >+ { data_type => "mediumtext", is_nullable => 0 }, >+ "datestamp", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 0, >+ }, >+ "deleted", >+ { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >+ "metadata", >+ { data_type => "longtext", is_nullable => 0 }, >+ "frameworkcode", >+ { data_type => "varchar", is_nullable => 0, size => 4 }, >+ "biblionumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "last_modified", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=head2 biblionumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Biblio> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "biblionumber", >+ "Koha::Schema::Result::Biblio", >+ { biblionumber => "biblionumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "NO ACTION", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-08-06 08:19:43 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Xlp1qyN+WtHaIoQMlXCvAQ >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.11.0
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 25905
:
107880
| 107881 |
107882
|
107883