Bugzilla – Attachment 81862 Details for
Bug 10662
Build OAI-PMH Harvesting Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10662: (QA follow-up) provide DBIC schema files
Bug-10662-QA-follow-up-provide-DBIC-schema-files.patch (text/plain), 13.52 KB, created by
David Cook
on 2018-11-02 07:08:49 UTC
(
hide
)
Description:
Bug 10662: (QA follow-up) provide DBIC schema files
Filename:
MIME Type:
Creator:
David Cook
Created:
2018-11-02 07:08:49 UTC
Size:
13.52 KB
patch
obsolete
>From 962959d6cab6b8f665fcc62e15796b8111405148 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 2 Nov 2018 06:56:57 +0000 >Subject: [PATCH] Bug 10662: (QA follow-up) provide DBIC schema files > >DBIC schema files >--- > Koha/Schema/Result/Biblio.pm | 19 ++- > Koha/Schema/Result/OaiHarvesterBiblio.pm | 120 +++++++++++++++ > Koha/Schema/Result/OaiHarvesterHistory.pm | 163 ++++++++++++++++++++ > Koha/Schema/Result/OaiHarvesterImportQueue.pm | 106 +++++++++++++ > Koha/Schema/Result/OaiHarvesterRequest.pm | 209 ++++++++++++++++++++++++++ > 5 files changed, 615 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/OaiHarvesterBiblio.pm > create mode 100644 Koha/Schema/Result/OaiHarvesterHistory.pm > create mode 100644 Koha/Schema/Result/OaiHarvesterImportQueue.pm > create mode 100644 Koha/Schema/Result/OaiHarvesterRequest.pm > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index b118011..c941508 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -242,6 +242,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 oai_harvester_biblios >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::OaiHarvesterBiblio> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "oai_harvester_biblios", >+ "Koha::Schema::Result::OaiHarvesterBiblio", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 old_reserves > > Type: has_many >@@ -348,7 +363,7 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bUv00JjY09Hj2Zj4klqyxA >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-11-02 06:45:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VvupcfvUfIAmpdpRqx2wDg > > 1; >diff --git a/Koha/Schema/Result/OaiHarvesterBiblio.pm b/Koha/Schema/Result/OaiHarvesterBiblio.pm >new file mode 100644 >index 0000000..72cf109 >--- /dev/null >+++ b/Koha/Schema/Result/OaiHarvesterBiblio.pm >@@ -0,0 +1,120 @@ >+use utf8; >+package Koha::Schema::Result::OaiHarvesterBiblio; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::OaiHarvesterBiblio >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<oai_harvester_biblios> >+ >+=cut >+ >+__PACKAGE__->table("oai_harvester_biblios"); >+ >+=head1 ACCESSORS >+ >+=head2 import_oai_biblio_id >+ >+ data_type: 'integer' >+ extra: {unsigned => 1} >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 oai_repository >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 191 >+ >+=head2 oai_identifier >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 191 >+ >+=head2 biblionumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "import_oai_biblio_id", >+ { >+ data_type => "integer", >+ extra => { unsigned => 1 }, >+ is_auto_increment => 1, >+ is_nullable => 0, >+ }, >+ "oai_repository", >+ { data_type => "varchar", is_nullable => 0, size => 191 }, >+ "oai_identifier", >+ { data_type => "varchar", is_nullable => 1, size => 191 }, >+ "biblionumber", >+ { data_type => "integer", is_foreign_key => 1, 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 UNIQUE CONSTRAINTS >+ >+=head2 C<oai_record> >+ >+=over 4 >+ >+=item * L</oai_identifier> >+ >+=item * L</oai_repository> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("oai_record", ["oai_identifier", "oai_repository"]); >+ >+=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.07042 @ 2018-11-02 06:45:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bBt9ph/pSfV97DMNrKCkpQ >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/OaiHarvesterHistory.pm b/Koha/Schema/Result/OaiHarvesterHistory.pm >new file mode 100644 >index 0000000..0fae751 >--- /dev/null >+++ b/Koha/Schema/Result/OaiHarvesterHistory.pm >@@ -0,0 +1,163 @@ >+use utf8; >+package Koha::Schema::Result::OaiHarvesterHistory; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::OaiHarvesterHistory >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<oai_harvester_history> >+ >+=cut >+ >+__PACKAGE__->table("oai_harvester_history"); >+ >+=head1 ACCESSORS >+ >+=head2 import_oai_id >+ >+ data_type: 'integer' >+ extra: {unsigned => 1} >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 repository >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 header_identifier >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 header_datestamp >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 0 >+ >+=head2 header_status >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 45 >+ >+=head2 record >+ >+ data_type: 'longtext' >+ is_nullable: 0 >+ >+=head2 upload_timestamp >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=head2 status >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 45 >+ >+=head2 filter >+ >+ data_type: 'text' >+ is_nullable: 0 >+ >+=head2 framework >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 4 >+ >+=head2 record_type >+ >+ data_type: 'enum' >+ extra: {list => ["biblio","auth","holdings"]} >+ is_nullable: 0 >+ >+=head2 matcher_code >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 10 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "import_oai_id", >+ { >+ data_type => "integer", >+ extra => { unsigned => 1 }, >+ is_auto_increment => 1, >+ is_nullable => 0, >+ }, >+ "repository", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "header_identifier", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "header_datestamp", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 0, >+ }, >+ "header_status", >+ { data_type => "varchar", is_nullable => 1, size => 45 }, >+ "record", >+ { data_type => "longtext", is_nullable => 0 }, >+ "upload_timestamp", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+ "status", >+ { data_type => "varchar", is_nullable => 0, size => 45 }, >+ "filter", >+ { data_type => "text", is_nullable => 0 }, >+ "framework", >+ { data_type => "varchar", is_nullable => 0, size => 4 }, >+ "record_type", >+ { >+ data_type => "enum", >+ extra => { list => ["biblio", "auth", "holdings"] }, >+ is_nullable => 0, >+ }, >+ "matcher_code", >+ { data_type => "varchar", is_nullable => 1, size => 10 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</import_oai_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("import_oai_id"); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-11-02 06:45:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:D948WAzJJ0Nzd974FjQzwQ >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/OaiHarvesterImportQueue.pm b/Koha/Schema/Result/OaiHarvesterImportQueue.pm >new file mode 100644 >index 0000000..0b75f0c >--- /dev/null >+++ b/Koha/Schema/Result/OaiHarvesterImportQueue.pm >@@ -0,0 +1,106 @@ >+use utf8; >+package Koha::Schema::Result::OaiHarvesterImportQueue; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::OaiHarvesterImportQueue >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<oai_harvester_import_queue> >+ >+=cut >+ >+__PACKAGE__->table("oai_harvester_import_queue"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ extra: {unsigned => 1} >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 uuid >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 45 >+ >+=head2 status >+ >+ data_type: 'varchar' >+ default_value: 'new' >+ is_nullable: 0 >+ size: 45 >+ >+=head2 result >+ >+ data_type: 'text' >+ is_nullable: 0 >+ >+=head2 result_timestamp >+ >+ 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, >+ }, >+ "uuid", >+ { data_type => "varchar", is_nullable => 0, size => 45 }, >+ "status", >+ { >+ data_type => "varchar", >+ default_value => "new", >+ is_nullable => 0, >+ size => 45, >+ }, >+ "result", >+ { data_type => "text", is_nullable => 0 }, >+ "result_timestamp", >+ { >+ 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"); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-11-02 06:45:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mPhK/vLiab1vjl/T/RwoAw >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/OaiHarvesterRequest.pm b/Koha/Schema/Result/OaiHarvesterRequest.pm >new file mode 100644 >index 0000000..68ce9fa >--- /dev/null >+++ b/Koha/Schema/Result/OaiHarvesterRequest.pm >@@ -0,0 +1,209 @@ >+use utf8; >+package Koha::Schema::Result::OaiHarvesterRequest; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::OaiHarvesterRequest >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<oai_harvester_requests> >+ >+=cut >+ >+__PACKAGE__->table("oai_harvester_requests"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ extra: {unsigned => 1} >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 uuid >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 45 >+ >+=head2 oai_verb >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 45 >+ >+=head2 oai_metadataPrefix >+ >+ accessor: 'oai_metadata_prefix' >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 oai_identifier >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 oai_from >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 45 >+ >+=head2 oai_until >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 45 >+ >+=head2 oai_set >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 http_url >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 http_username >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 http_password >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 http_realm >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 import_filter >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 import_framework_code >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 4 >+ >+=head2 import_record_type >+ >+ data_type: 'enum' >+ extra: {list => ["biblio","auth","holdings"]} >+ is_nullable: 0 >+ >+=head2 import_matcher_code >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 10 >+ >+=head2 interval >+ >+ data_type: 'integer' >+ extra: {unsigned => 1} >+ is_nullable: 0 >+ >+=head2 name >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 45 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { >+ data_type => "integer", >+ extra => { unsigned => 1 }, >+ is_auto_increment => 1, >+ is_nullable => 0, >+ }, >+ "uuid", >+ { data_type => "varchar", is_nullable => 0, size => 45 }, >+ "oai_verb", >+ { data_type => "varchar", is_nullable => 0, size => 45 }, >+ "oai_metadataPrefix", >+ { >+ accessor => "oai_metadata_prefix", >+ data_type => "varchar", >+ is_nullable => 0, >+ size => 255, >+ }, >+ "oai_identifier", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "oai_from", >+ { data_type => "varchar", is_nullable => 1, size => 45 }, >+ "oai_until", >+ { data_type => "varchar", is_nullable => 1, size => 45 }, >+ "oai_set", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "http_url", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "http_username", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "http_password", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "http_realm", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "import_filter", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "import_framework_code", >+ { data_type => "varchar", is_nullable => 0, size => 4 }, >+ "import_record_type", >+ { >+ data_type => "enum", >+ extra => { list => ["biblio", "auth", "holdings"] }, >+ is_nullable => 0, >+ }, >+ "import_matcher_code", >+ { data_type => "varchar", is_nullable => 1, size => 10 }, >+ "interval", >+ { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 }, >+ "name", >+ { data_type => "varchar", is_nullable => 0, size => 45 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-11-02 06:45:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c8IcaxEQMjEZvM4LPzOTKg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.1.4
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 10662
:
20757
|
20758
|
21954
|
42446
|
42447
|
42448
|
44792
|
44793
|
47675
|
48096
|
49832
|
50254
|
50980
|
51510
|
51511
|
51512
|
51514
|
51562
|
51563
|
51564
|
51565
|
51705
|
53258
|
53259
|
53260
|
53361
|
53362
|
64444
|
64445
|
64446
|
64479
|
64480
|
64481
|
65016
|
65017
|
65018
|
65019
|
68508
|
71008
|
71009
|
71010
|
71011
|
71012
|
71013
|
71014
|
71015
|
78569
|
78570
|
78571
|
78572
|
78573
|
78574
|
78575
|
78576
|
78577
|
78583
|
78601
|
78617
|
78754
|
78756
|
78758
|
78760
|
78762
|
78764
|
78767
|
78769
|
78771
|
78859
|
78860
|
78914
|
78956
|
79039
|
79045
|
81783
|
81784
|
81786
|
81789
|
81790
|
81855
|
81856
|
81861
|
81862
|
81863
|
81864
|
81902
|
82219
|
84318
|
84319
|
84320
|
84321
|
84322
|
85152
|
85224
|
85225
|
85226
|
85227
|
85228
|
85229
|
99739
|
99740
|
99741
|
99742
|
99743
|
99744
|
99745