Bugzilla – Attachment 84200 Details for
Bug 22155
biblio_metadata.marcflavour should be renamed 'schema'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22155: DB update
Bug-22155-DB-update.patch (text/plain), 3.20 KB, created by
Kyle M Hall (khall)
on 2019-01-18 15:20:31 UTC
(
hide
)
Description:
Bug 22155: DB update
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-01-18 15:20:31 UTC
Size:
3.20 KB
patch
obsolete
>From 10c4a1f9711f09c7ae028e5e55ba82f93542766c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 17 Jan 2019 22:55:11 -0300 >Subject: [PATCH] Bug 22155: DB update > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_22155.perl | 20 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 8 ++++---- > 2 files changed, 24 insertions(+), 4 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_22155.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22155.perl b/installer/data/mysql/atomicupdate/bug_22155.perl >new file mode 100644 >index 0000000000..2b90205b82 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22155.perl >@@ -0,0 +1,20 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ >+ if ( column_exists( 'biblio_metadata', 'marcflavour' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE biblio_metadata >+ CHANGE COLUMN marcflavour `schema` VARCHAR(16) >+ }); >+ } >+ >+ if ( column_exists( 'deletedbiblio_metadata', 'marcflavour' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE deletedbiblio_metadata >+ CHANGE COLUMN marcflavour `schema` VARCHAR(16) >+ }); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 22155 - biblio_metadata.marcflavour should be renamed 'schema')\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 2575d5b474..7c6ca2d947 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4007,11 +4007,11 @@ CREATE TABLE biblio_metadata ( > `id` INT(11) NOT NULL AUTO_INCREMENT, > `biblionumber` INT(11) NOT NULL, > `format` VARCHAR(16) NOT NULL, >- `marcflavour` VARCHAR(16) NOT NULL, >+ `schema` VARCHAR(16) NOT NULL, > `metadata` LONGTEXT NOT NULL, > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, > PRIMARY KEY(id), >- UNIQUE KEY `biblio_metadata_uniq_key` (`biblionumber`,`format`,`marcflavour`), >+ UNIQUE KEY `biblio_metadata_uniq_key` (`biblionumber`,`format`,`schema`), > CONSTRAINT `record_metadata_fk_1` FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, > KEY `timestamp` (`timestamp`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >@@ -4025,11 +4025,11 @@ CREATE TABLE deletedbiblio_metadata ( > `id` INT(11) NOT NULL AUTO_INCREMENT, > `biblionumber` INT(11) NOT NULL, > `format` VARCHAR(16) NOT NULL, >- `marcflavour` VARCHAR(16) NOT NULL, >+ `schema` VARCHAR(16) NOT NULL, > `metadata` LONGTEXT NOT NULL, > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, > PRIMARY KEY(id), >- UNIQUE KEY `deletedbiblio_metadata_uniq_key` (`biblionumber`,`format`,`marcflavour`), >+ UNIQUE KEY `deletedbiblio_metadata_uniq_key` (`biblionumber`,`format`,`schema`), > CONSTRAINT `deletedrecord_metadata_fk_1` FOREIGN KEY (biblionumber) REFERENCES deletedbiblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, > KEY `timestamp` (`timestamp`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >-- >2.17.2 (Apple Git-113)
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 22155
:
84175
|
84176
|
84177
|
84182
|
84183
|
84200
|
84201
|
84244
|
84245