Bugzilla – Attachment 78255 Details for
Bug 18639
Separate replacement cost and retail price fields in acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18639: Alter DB update to populate replacementprice from rpp initially
Bug-18639-Alter-DB-update-to-populate-replacementp.patch (text/plain), 1.40 KB, created by
Katrin Fischer
on 2018-08-29 06:03:19 UTC
(
hide
)
Description:
Bug 18639: Alter DB update to populate replacementprice from rpp initially
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-08-29 06:03:19 UTC
Size:
1.40 KB
patch
obsolete
>From 07390840039968996cdf1d2f3577b8ca749a2e49 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 27 Aug 2018 18:21:23 +0000 >Subject: [PATCH] Bug 18639: Alter DB update to populate replacementprice from > rpp initially > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../bug_18639_add_replacementprice_field_to_aqorders.perl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl b/installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl >index 004d6ab29b..152b14d0e7 100644 >--- a/installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl >+++ b/installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl >@@ -1,6 +1,9 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do( "ALTER TABLE aqorders ADD COLUMN replacementprice DECIMAL(28,6)" ); >+ if( !column_exists( 'aqorders', 'replacementprice' ){ >+ $dbh->do( "ALTER TABLE aqorders ADD COLUMN replacementprice DECIMAL(28,6)" ); >+ $dbh->do( "UPDATE aqorders set replacementprice = rrp WHERE replacementprice IS NULL" ); >+ } > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 18639 - Add replacementprice field to aqorders table)\n"; > } >-- >2.17.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 18639
:
70213
|
70214
|
70215
|
70216
|
75946
|
76867
|
76868
|
76869
|
76870
|
76871
|
78184
|
78185
|
78186
|
78187
|
78188
|
78189
|
78191
|
78249
|
78250
|
78251
|
78252
|
78253
|
78254
| 78255 |
78256
|
79789