Bugzilla – Attachment 169941 Details for
Bug 35659
OAI harvester
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
DO NOT PUSH: Bug 35659 DBIC Update
DO-NOT-PUSH-Bug-35659-DBIC-Update.patch (text/plain), 11.31 KB, created by
Matthias Meusburger
on 2024-08-01 11:42:36 UTC
(
hide
)
Description:
DO NOT PUSH: Bug 35659 DBIC Update
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2024-08-01 11:42:36 UTC
Size:
11.31 KB
patch
obsolete
>From 5c7317dba2631db326b8dd98305ad823a168a443 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 31 Jul 2024 14:45:40 +0000 >Subject: [PATCH] DO NOT PUSH: Bug 35659 DBIC Update > >--- > Koha/Schema/Result/AuthHeader.pm | 21 +++- > Koha/Schema/Result/Biblio.pm | 19 ++- > Koha/Schema/Result/ImportOaiAuthority.pm | 152 +++++++++++++++++++++++ > Koha/Schema/Result/ImportOaiBiblio.pm | 146 ++++++++++++++++++++++ > Koha/Schema/Result/OaiServer.pm | 135 ++++++++++++++++++++ > 5 files changed, 469 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/ImportOaiAuthority.pm > create mode 100644 Koha/Schema/Result/ImportOaiBiblio.pm > create mode 100644 Koha/Schema/Result/OaiServer.pm > >diff --git a/Koha/Schema/Result/AuthHeader.pm b/Koha/Schema/Result/AuthHeader.pm >index 499b23a393..69dc79ddfe 100644 >--- a/Koha/Schema/Result/AuthHeader.pm >+++ b/Koha/Schema/Result/AuthHeader.pm >@@ -128,9 +128,26 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("authid"); > >+=head1 RELATIONS > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-10 14:00:56 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gYG6yQ6EC5gVMZHF1h6MJA >+=head2 import_oai_authorities >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ImportOaiAuthority> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "import_oai_authorities", >+ "Koha::Schema::Result::ImportOaiAuthority", >+ { "foreign.authid" => "self.authid" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 14:45:08 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qQKXXu/9rBZ89hnDzJMsvA > > sub koha_object_class { > 'Koha::Authority'; >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index d1277e7ce8..a8e7098854 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -360,6 +360,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 import_oai_biblios >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ImportOaiBiblio> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "import_oai_biblios", >+ "Koha::Schema::Result::ImportOaiBiblio", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 item_groups > > Type: has_many >@@ -616,8 +631,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-05-09 07:11:30 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AZgt+4mVV/QYtSsdhxmaBQ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 14:45:08 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rLzlHl6jAwBmgmiXavpP0w > > __PACKAGE__->has_many( > "biblioitem", >diff --git a/Koha/Schema/Result/ImportOaiAuthority.pm b/Koha/Schema/Result/ImportOaiAuthority.pm >new file mode 100644 >index 0000000000..99e01adf7e >--- /dev/null >+++ b/Koha/Schema/Result/ImportOaiAuthority.pm >@@ -0,0 +1,152 @@ >+use utf8; >+package Koha::Schema::Result::ImportOaiAuthority; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ImportOaiAuthority >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<import_oai_authorities> >+ >+=cut >+ >+__PACKAGE__->table("import_oai_authorities"); >+ >+=head1 ACCESSORS >+ >+=head2 import_oai_authority_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+unique identifier assigned by Koha >+ >+=head2 authid >+ >+ data_type: 'bigint' >+ extra: {unsigned => 1} >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+unique identifier assigned to each koha record >+ >+=head2 identifier >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+OAI record identifier >+ >+=head2 repository >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+OAI repository >+ >+=head2 recordtype >+ >+ data_type: 'enum' >+ default_value: 'biblio' >+ extra: {list => ["authority","biblio"]} >+ is_nullable: 0 >+ >+is the record bibliographic or authority >+ >+=head2 datestamp >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+OAI set to harvest >+ >+=head2 last_modified >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "import_oai_authority_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "authid", >+ { >+ data_type => "bigint", >+ extra => { unsigned => 1 }, >+ is_foreign_key => 1, >+ is_nullable => 0, >+ }, >+ "identifier", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "repository", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "recordtype", >+ { >+ data_type => "enum", >+ default_value => "biblio", >+ extra => { list => ["authority", "biblio"] }, >+ is_nullable => 0, >+ }, >+ "datestamp", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "last_modified", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</import_oai_authority_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("import_oai_authority_id"); >+ >+=head1 RELATIONS >+ >+=head2 authid >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::AuthHeader> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "authid", >+ "Koha::Schema::Result::AuthHeader", >+ { authid => "authid" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "NO ACTION" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 14:51:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PoiX9tXFhEq07VBfEg9HFw >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/ImportOaiBiblio.pm b/Koha/Schema/Result/ImportOaiBiblio.pm >new file mode 100644 >index 0000000000..11471853e0 >--- /dev/null >+++ b/Koha/Schema/Result/ImportOaiBiblio.pm >@@ -0,0 +1,146 @@ >+use utf8; >+package Koha::Schema::Result::ImportOaiBiblio; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ImportOaiBiblio >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<import_oai_biblios> >+ >+=cut >+ >+__PACKAGE__->table("import_oai_biblios"); >+ >+=head1 ACCESSORS >+ >+=head2 import_oai_biblio_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+unique identifier assigned by Koha >+ >+=head2 biblionumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+unique identifier assigned to each koha record >+ >+=head2 identifier >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+OAI record identifier >+ >+=head2 repository >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+OAI repository >+ >+=head2 recordtype >+ >+ data_type: 'enum' >+ default_value: 'biblio' >+ extra: {list => ["authority","biblio"]} >+ is_nullable: 0 >+ >+is the record bibliographic or authority >+ >+=head2 datestamp >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+OAI set to harvest >+ >+=head2 last_modified >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "import_oai_biblio_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "biblionumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "identifier", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "repository", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "recordtype", >+ { >+ data_type => "enum", >+ default_value => "biblio", >+ extra => { list => ["authority", "biblio"] }, >+ is_nullable => 0, >+ }, >+ "datestamp", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "last_modified", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</import_oai_biblio_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("import_oai_biblio_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, on_delete => "CASCADE", on_update => "NO ACTION" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 14:51:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:25riMQF65/EoFhTXdZbcBg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/OaiServer.pm b/Koha/Schema/Result/OaiServer.pm >new file mode 100644 >index 0000000000..a1a862dbc5 >--- /dev/null >+++ b/Koha/Schema/Result/OaiServer.pm >@@ -0,0 +1,135 @@ >+use utf8; >+package Koha::Schema::Result::OaiServer; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::OaiServer >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<oai_servers> >+ >+=cut >+ >+__PACKAGE__->table("oai_servers"); >+ >+=head1 ACCESSORS >+ >+=head2 oai_server_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+unique identifier assigned by Koha >+ >+=head2 endpoint >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+OAI endpoint (host + port + path) >+ >+=head2 oai_set >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+OAI set to harvest >+ >+=head2 servername >+ >+ data_type: 'longtext' >+ is_nullable: 0 >+ >+name given to the target by the library >+ >+=head2 dataformat >+ >+ data_type: 'enum' >+ default_value: 'oai_dc' >+ extra: {list => ["oai_dc","marc-xml","marcxml"]} >+ is_nullable: 0 >+ >+data format >+ >+=head2 recordtype >+ >+ data_type: 'enum' >+ default_value: 'biblio' >+ extra: {list => ["authority","biblio"]} >+ is_nullable: 0 >+ >+server contains bibliographic or authority records >+ >+=head2 add_xslt >+ >+ data_type: 'longtext' >+ is_nullable: 1 >+ >+zero or more paths to XSLT files to be processed on the search results >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "oai_server_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "endpoint", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "oai_set", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "servername", >+ { data_type => "longtext", is_nullable => 0 }, >+ "dataformat", >+ { >+ data_type => "enum", >+ default_value => "oai_dc", >+ extra => { list => ["oai_dc", "marc-xml", "marcxml"] }, >+ is_nullable => 0, >+ }, >+ "recordtype", >+ { >+ data_type => "enum", >+ default_value => "biblio", >+ extra => { list => ["authority", "biblio"] }, >+ is_nullable => 0, >+ }, >+ "add_xslt", >+ { data_type => "longtext", is_nullable => 1 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</oai_server_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("oai_server_id"); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-07-31 14:51:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HeQgY+4P10NKCtLqdExv+g >+ >+sub koha_object_class { >+ 'Koha::OAIServer'; >+} >+sub koha_objects_class { >+ 'Koha::OAIServers'; >+} >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.39.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 35659
:
160356
|
160357
|
160744
|
161813
|
161960
|
162004
|
162005
|
162006
|
162007
|
162008
|
162009
|
162010
|
162011
|
162527
|
162528
|
162692
|
162693
|
162694
|
163527
|
164586
|
164590
|
164602
|
164603
|
164604
|
164605
|
164606
|
164618
|
164619
|
164620
|
164621
|
164622
|
165199
|
165594
|
165595
|
165596
|
165597
|
165598
|
167106
|
167107
|
167171
|
167172
|
167173
|
167174
|
167175
|
167176
|
168982
|
168983
|
169941
|
171255
|
171258
|
171260
|
171264
|
171265
|
171267
|
171675
|
171676
|
171678
|
171679
|
172072
|
172073
|
172074
|
172075
|
172076
|
172077
|
172078
|
172079
|
172080
|
172081
|
172082
|
172083
|
172202
|
172203
|
172204
|
172205
|
172206
|
172207
|
172208
|
172209
|
172210
|
172211
|
172212
|
172213
|
173088
|
173089
|
173090
|
173091
|
173092
|
173093
|
173094
|
173095
|
173096
|
173097
|
173098
|
173099
|
173100
|
173101
|
173561
|
173599
|
173600
|
173601
|
173614