Bugzilla – Attachment 88337 Details for
Bug 22729
flgAnonymized shouldn't be NULL and should be renamed anonymized
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22729: Add dbrev to rename column (incl kohastructure)
Bug-22729-Add-dbrev-to-rename-column-incl-kohastru.patch (text/plain), 2.83 KB, created by
Marcel de Rooy
on 2019-04-19 08:26:19 UTC
(
hide
)
Description:
Bug 22729: Add dbrev to rename column (incl kohastructure)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-04-19 08:26:19 UTC
Size:
2.83 KB
patch
obsolete
>From 0a0fd2ece63b4432c03ecea71dca7cad454bbc17 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 19 Apr 2019 08:16:12 +0000 >Subject: [PATCH] Bug 22729: Add dbrev to rename column (incl kohastructure) >Content-Type: text/plain; charset=utf-8 > >Speaks for itself. > >Test plan: >Run the dbrev. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_22729.perl | 12 ++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ++-- > 2 files changed, 14 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_22729.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22729.perl b/installer/data/mysql/atomicupdate/bug_22729.perl >new file mode 100644 >index 0000000000..5d93caa271 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22729.perl >@@ -0,0 +1,12 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ if ( column_exists( 'borrowers', 'flgAnonymized' ) ) { >+ $dbh->do( "ALTER TABLE borrowers CHANGE COLUMN flgAnonymized anonymized tinyint DEFAULT 0" ); >+ } >+ if ( column_exists( 'deletedborrowers', 'flgAnonymized' ) ) { >+ $dbh->do( "ALTER TABLE deletedborrowers CHANGE COLUMN flgAnonymized anonymized tinyint DEFAULT 0" ); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 22729 - Rename flgAnonymized)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 7b78a87b76..6c6d9aecd9 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -609,7 +609,7 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower > `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron > `login_attempts` int(4) default 0, -- number of failed login attemps > `overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token >- `flgAnonymized` tinyint DEFAULT 0, -- flag for data anonymization >+ `anonymized` tinyint DEFAULT 0, -- flag for data anonymization > KEY borrowernumber (borrowernumber), > KEY `cardnumber` (`cardnumber`), > KEY `sms_provider_id` (`sms_provider_id`) >@@ -1643,7 +1643,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons > `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron > `login_attempts` int(4) default 0, -- number of failed login attemps > `overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token >- `flgAnonymized` tinyint DEFAULT 0, -- flag for data anonymization >+ `anonymized` tinyint DEFAULT 0, -- flag for data anonymization > UNIQUE KEY `cardnumber` (`cardnumber`), > PRIMARY KEY `borrowernumber` (`borrowernumber`), > KEY `categorycode` (`categorycode`), >-- >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 22729
:
88222
|
88223
|
88224
|
88337
|
88338
|
88339
|
88340
|
88349
|
88350
|
88351
|
88352
|
88353
|
88692
|
88693
|
88694
|
88695
|
88696
|
88745