Bugzilla – Attachment 88239 Details for
Bug 13795
Delete unused columns from statistics table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13795: Make database update idempotent
Bug-13795-Make-database-update-idempotent.patch (text/plain), 1.47 KB, created by
Katrin Fischer
on 2019-04-17 20:08:28 UTC
(
hide
)
Description:
Bug 13795: Make database update idempotent
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-17 20:08:28 UTC
Size:
1.47 KB
patch
obsolete
>From b0cd79cfafede1411db17edfbf1e4bca43ad2251 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 20 Mar 2019 15:26:38 +0000 >Subject: [PATCH] Bug 13795: Make database update idempotent > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../mysql/atomicupdate/Bug13795_Remove_unused_columns.perl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl b/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl >index 51e223eab7..71c7604afc 100644 >--- a/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl >+++ b/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl >@@ -1,12 +1,12 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do(q{ >- ALTER TABLE statistics >- DROP COLUMN associatedborrower >- DROP COLUMN usercode >- }); >+ if( column_exists('statistics', 'associatedborrower') ) { >+ $dbh->do(q{ ALTER TABLE statistics DROP COLUMN associatedborrower }); >+ } >+ if( column_exists('statistics', 'usercode') ) { >+ $dbh->do(q{ ALTER TABLE statistics DROP COLUMN usercode }); >+ } > > SetVersion($DBversion); >- > print "Upgrade to $DBversion done (Bug 13795 - Delete unused fields from statistics table)\n"; > } >-- >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 13795
:
36578
|
47555
|
86809
|
86810
|
86811
|
88233
|
88234
|
88235
|
88238
| 88239 |
88240