Bugzilla – Attachment 44416 Details for
Bug 15095
marc_modificacation_template_actions DB not consistent between fresh and updated DB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15095: marc_modificacation_template_actions DB not consistent between fresh and updated DB
PASSED-QA-Bug-15095-marcmodificacationtemplateacti.patch (text/plain), 3.44 KB, created by
Kyle M Hall (khall)
on 2015-11-04 15:26:55 UTC
(
hide
)
Description:
[PASSED QA] Bug 15095: marc_modificacation_template_actions DB not consistent between fresh and updated DB
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-04 15:26:55 UTC
Size:
3.44 KB
patch
obsolete
>From d3d97e084da54a8587788d20774c7ddb23315872 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sat, 31 Oct 2015 11:57:42 -0300 >Subject: [PATCH] [PASSED QA] Bug 15095: marc_modificacation_template_actions DB not consistent between fresh and updated DB > >A review of the 3.20.00 + upgrade DB, compared to a fresh master install >highlighted an inconsistency on that table. This is mysqldbcompare's >output for it: > >- `action` enum('delete_field','update_field','move_field','copy_field','copy_and_replace_field') COLLATE utf8_unicode_ci DEFAULT NULL, >? ------------------------- ^^^^^^ >+ `action` enum('delete_field','update_field','move_field','copy_field') COLLATE utf8_unicode_ci NOT NULL, > >So one ENUM value is missing on fresh installs, and an upgraded one >yields a DEFAULT NULL configuration for the 'action' column. > >To test: >1) have a v3.20.00 DB: > > CREATE DATABASE koha_master_upgraded; > $ git checkout v3.20.00 > $ mysql koha_master_upgraded < installer/data/mysql/kohastructure.sql >2) upgrade it to latest master by running: > $ git checkout origin/master > $ perl installer/data/mysql/updatedatabase.pl >3) Create a new DB > > CREATE DATABASE koha_master_fresh; > $ mysql koha_master_fresh < installer/data/mysql/kohastructure.sql >4) Run mysqldbcompare (you need mysql-utilities installed for that) > $ mysqldbcompare --difftype=differ --server1=root@localhost \ > --skip-data-check --skip-table-options \ > --run-all-tests koha_master_upgraded:koha_master_fresh >=> FAIL: You will notice the marc_modification_template_actions discrepancy >- Repeat from 1), but apply this patch on 2) before the upgrade. >=> SUCCESS: The DB's discrepancies are now irrelevant [1] >- Sign off :-D > >[1] Only KEY definition order is 'wrong', but it is not relevant. > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 1 + > 2 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 12b7924..420c552 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3450,7 +3450,7 @@ CREATE TABLE IF NOT EXISTS marc_modification_template_actions ( > mmta_id int(11) NOT NULL AUTO_INCREMENT, > template_id int(11) NOT NULL, > ordering int(3) NOT NULL, >- action enum('delete_field','update_field','move_field','copy_field') NOT NULL, >+ action ENUM('delete_field','update_field','move_field','copy_field','copy_and_replace_field') NOT NULL, > field_number smallint(6) NOT NULL DEFAULT '0', > from_field varchar(3) NOT NULL, > from_subfield varchar(1) DEFAULT NULL, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 5e1bff4..70167ab 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -10837,6 +10837,7 @@ if ( CheckVersion($DBversion) ) { > ALTER TABLE marc_modification_template_actions > MODIFY COLUMN action > ENUM('delete_field','update_field','move_field','copy_field','copy_and_replace_field') >+ NOT NULL > }); > print "Upgrade to $DBversion done (Bug 14098: Regression in Marc Modification Templates)\n"; > SetVersion($DBversion); >-- >1.7.2.5
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 15095
:
44266
|
44315
| 44416