Bugzilla – Attachment 86810 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.32 KB, created by
Josef Moravec
on 2019-03-20 15:36:52 UTC
(
hide
)
Description:
Bug 13795: Make database update idempotent
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-03-20 15:36:52 UTC
Size:
1.32 KB
patch
obsolete
>From d82f6b66b7208509c45786f4e6945f9e5c28748c 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 > >--- > .../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 7b47dc44e5..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