Bugzilla – Attachment 107880 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: Add new 'import_oaipmh_biblios' table
Bug-25905-Add-new-importoaipmhbiblios-table.patch (text/plain), 3.62 KB, created by
David Cook
on 2020-08-06 12:29:05 UTC
(
hide
)
Description:
Bug 25905: Add new 'import_oaipmh_biblios' table
Filename:
MIME Type:
Creator:
David Cook
Created:
2020-08-06 12:29:05 UTC
Size:
3.62 KB
patch
obsolete
>From 69865a1f1a4db59f431e2fd62e819aad5659e07a Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 6 Aug 2020 08:21:01 +0000 >Subject: [PATCH] Bug 25905: Add new 'import_oaipmh_biblios' table > >--- > .../bug_25905_import_oaipmh_biblios_table.perl | 25 ++++++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 20 +++++++++++++++++ > 2 files changed, 45 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_25905_import_oaipmh_biblios_table.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_25905_import_oaipmh_biblios_table.perl b/installer/data/mysql/atomicupdate/bug_25905_import_oaipmh_biblios_table.perl >new file mode 100644 >index 0000000000..2a96ff2869 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25905_import_oaipmh_biblios_table.perl >@@ -0,0 +1,25 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ >+ unless( TableExists('import_oaipmh_biblios') ) { >+ $dbh->do(q{ >+ CREATE TABLE import_oaipmh_biblios ( >+ id INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT, >+ repository MEDIUMTEXT NOT NULL, -- this is a URL so it needs to be long >+ identifier MEDIUMTEXT NOT NULL, -- this is technically a URI >+ datestamp datetime NOT NULL, -- this is a UTC timestamp >+ deleted TINYINT(1) DEFAULT 0, -- boolean for header status of deleted >+ metadata LONGTEXT NOT NULL, -- OAI-PMH encapsulated metadata >+ frameworkcode varchar(4) NOT NULL, -- frameworkcode to use when importing >+ biblionumber INT(11), >+ last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, >+ PRIMARY KEY (id), >+ KEY biblionumber (biblionumber), >+ CONSTRAINT FK_import_oaipmh_biblios_1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE NO ACTION >+ ) ENGINE = INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ }); >+ } >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 25905, "Add a new 'import_oaipmh_biblios' table"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index cc7c133653..e4298f17b8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4570,6 +4570,26 @@ CREATE TABLE advanced_editor_macros ( > CONSTRAINT borrower_macro_fk FOREIGN KEY ( borrowernumber ) REFERENCES borrowers ( borrowernumber ) ON UPDATE CASCADE ON DELETE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >+-- >+-- Table structure for table import_oaipmh_biblios >+-- >+ >+DROP TABLE IF EXISTS import_oaipmh_biblios; >+CREATE TABLE import_oaipmh_biblios ( >+ id INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT, >+ repository MEDIUMTEXT NOT NULL, -- this is a URL so it needs to be long >+ identifier MEDIUMTEXT NOT NULL, -- this is technically a URI >+ datestamp datetime NOT NULL, -- this is a UTC timestamp >+ deleted TINYINT(1) DEFAULT 0, -- boolean for header status of deleted >+ metadata LONGTEXT NOT NULL, -- OAI-PMH encapsulated metadata >+ frameworkcode varchar(4) NOT NULL, -- frameworkcode to use when importing >+ biblionumber INT(11), >+ last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, >+ PRIMARY KEY (id), >+ KEY biblionumber (biblionumber), >+ CONSTRAINT FK_import_oaipmh_biblios_1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE NO ACTION >+) ENGINE = INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >-- >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