Bugzilla – Attachment 155607 Details for
Bug 34789
Fix typo in erm_eholdings_titles
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34789: Database and API update
Bug-34789-Database-and-API-update.patch (text/plain), 5.06 KB, created by
Matt Blenkinsop
on 2023-09-14 12:29:38 UTC
(
hide
)
Description:
Bug 34789: Database and API update
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-09-14 12:29:38 UTC
Size:
5.06 KB
patch
obsolete
>From b96a5c13217bfa61e6774741fac6b2819f4e8aba Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 14 Sep 2023 12:23:49 +0000 >Subject: [PATCH] Bug 34789: Database and API update > >Currently the erm_eholdings_titles table has a field called preceeding_publication_title_id. This should be preceding_publication_title_id >--- > .../definitions/erm_eholdings_title.yaml | 4 +-- > .../swagger/paths/erm_eholdings_titles.yaml | 4 +-- > .../atomicupdate/bug_34789-rename-column.pl | 35 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 6 ++-- > 4 files changed, 42 insertions(+), 7 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_34789-rename-column.pl > >diff --git a/api/v1/swagger/definitions/erm_eholdings_title.yaml b/api/v1/swagger/definitions/erm_eholdings_title.yaml >index 7387a185f1..7185009fef 100644 >--- a/api/v1/swagger/definitions/erm_eholdings_title.yaml >+++ b/api/v1/swagger/definitions/erm_eholdings_title.yaml >@@ -124,8 +124,8 @@ properties: > type: > - string > - "null" >- preceeding_publication_title_id: >- description: preceeding_publication_title_id of the title >+ preceding_publication_title_id: >+ description: preceding_publication_title_id of the title > type: > - string > - "null" >diff --git a/api/v1/swagger/paths/erm_eholdings_titles.yaml b/api/v1/swagger/paths/erm_eholdings_titles.yaml >index 59a606c1eb..a72ef34bd0 100644 >--- a/api/v1/swagger/paths/erm_eholdings_titles.yaml >+++ b/api/v1/swagger/paths/erm_eholdings_titles.yaml >@@ -134,9 +134,9 @@ > name: parent_publication_title_id > required: false > type: string >- - description: Case insensitive search on title preceeding_publication_title_id >+ - description: Case insensitive search on title preceding_publication_title_id > in: query >- name: preceeding_publication_title_id >+ name: preceding_publication_title_id > required: false > type: string > - description: Case insensitive search on title access_type >diff --git a/installer/data/mysql/atomicupdate/bug_34789-rename-column.pl b/installer/data/mysql/atomicupdate/bug_34789-rename-column.pl >new file mode 100755 >index 0000000000..f305f27ffa >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_34789-rename-column.pl >@@ -0,0 +1,35 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "34789", >+ description => "A single line description", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( column_exists( 'erm_eholdings_titles', 'preceeding_publication_title_id' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE erm_eholdings_titles RENAME COLUMN preceeding_publication_title_id TO preceding_publication_title_id >+ } >+ ); >+ say $out 'Column renamed to preceding_publication_title_id'; >+ } >+ if ( column_exists( 'erm_eholdings_titles', 'publication_title' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE erm_eholdings_titles MODIFY COLUMN publication_title mediumtext >+ } >+ ); >+ say $out 'Column datatype amended to mediumtext'; >+ } >+ if ( column_exists( 'erm_eholdings_titles', 'notes' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE erm_eholdings_titles MODIFY COLUMN notes mediumtext >+ } >+ ); >+ say $out 'Column datatype amended to mediumtext'; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 21f6ec015c..add4518807 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3010,7 +3010,7 @@ DROP TABLE IF EXISTS `erm_eholdings_titles`; > CREATE TABLE `erm_eholdings_titles` ( > `title_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', > `biblio_id` int(11) DEFAULT NULL, >- `publication_title` varchar(255) DEFAULT NULL, >+ `publication_title` mediumtext DEFAULT NULL, > `external_id` varchar(255) DEFAULT NULL, > `print_identifier` varchar(255) DEFAULT NULL, > `online_identifier` varchar(255) DEFAULT NULL, >@@ -3024,7 +3024,7 @@ CREATE TABLE `erm_eholdings_titles` ( > `first_author` varchar(255) DEFAULT NULL, > `embargo_info` varchar(255) DEFAULT NULL, > `coverage_depth` varchar(255) DEFAULT NULL, >- `notes` varchar(255) DEFAULT NULL, >+ `notes` mediumtext DEFAULT NULL, > `publisher_name` varchar(255) DEFAULT NULL, > `publication_type` varchar(80) DEFAULT NULL, > `date_monograph_published_print` varchar(255) DEFAULT NULL, >@@ -3033,7 +3033,7 @@ CREATE TABLE `erm_eholdings_titles` ( > `monograph_edition` varchar(255) DEFAULT NULL, > `first_editor` varchar(255) DEFAULT NULL, > `parent_publication_title_id` varchar(255) DEFAULT NULL, >- `preceeding_publication_title_id` varchar(255) DEFAULT NULL, >+ `preceding_publication_title_id` varchar(255) DEFAULT NULL, > `access_type` varchar(255) DEFAULT NULL, > PRIMARY KEY (`title_id`), > KEY `erm_eholdings_titles_ibfk_2` (`biblio_id`), >-- >2.37.1 (Apple Git-137.1)
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 34789
:
155607
|
155608
|
155609
|
155610
|
155730
|
155731
|
155732
|
155733
|
155750
|
155751
|
155752
|
155753
|
155754
|
155887