Bugzilla – Attachment 84175 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.19 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-01-18 01:55:30 UTC
(
hide
)
Description:
Bug 22155: DB update
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-01-18 01:55:30 UTC
Size:
3.19 KB
patch
obsolete
>From 7f388ba04ff22b46820781f124574397037be38b 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 > >--- > .../data/mysql/atomicupdate/bug_22155.perl | 22 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 8 +++---- > 2 files changed, 26 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..9375f0a952 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22155.perl >@@ -0,0 +1,22 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ >+ if ( ColumnExists( 'biblio_metadata', 'marcflavour' ) ) { >+ print "Exists!"; >+ $dbh->do(q{ >+ ALTER TABLE biblio_metadata >+ CHANGE COLUMN marcflavour `schema` VARCHAR(16) >+ }); >+ } >+ >+ if ( ColumnExists( 'deletedbiblio_metadata', 'marcflavour' ) ) { >+ print "Exists deelte"; >+ $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.20.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 22155
:
84175
|
84176
|
84177
|
84182
|
84183
|
84200
|
84201
|
84244
|
84245