Bugzilla – Attachment 165853 Details for
Bug 36002
Get rid of aqorders.purchaseordernumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36002: (follow-up) Save purchaseordernumbers from aqorders
Bug-36002-follow-up-Save-purchaseordernumbers-from.patch (text/plain), 1.67 KB, created by
Marcel de Rooy
on 2024-04-30 11:49:33 UTC
(
hide
)
Description:
Bug 36002: (follow-up) Save purchaseordernumbers from aqorders
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-30 11:49:33 UTC
Size:
1.67 KB
patch
obsolete
>From 0dae6efb8792df9b8f99a12db9d1c83e96d87942 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 30 Apr 2024 11:41:55 +0000 >Subject: [PATCH] Bug 36002: (follow-up) Save purchaseordernumbers from > aqorders >Content-Type: text/plain; charset=utf-8 > >We copy them here to another (temporary) table. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_36002.pl | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_36002.pl b/installer/data/mysql/atomicupdate/bug_36002.pl >index 188c48e7e7..aa4bef2951 100755 >--- a/installer/data/mysql/atomicupdate/bug_36002.pl >+++ b/installer/data/mysql/atomicupdate/bug_36002.pl >@@ -6,7 +6,24 @@ return { > up => sub { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ > if ( column_exists( 'aqorders', 'purchaseordernumber' ) ) { >+ my ($cnt) = $dbh->selectrow_array( >+ q| >+SELECT count(*) FROM aqorders >+WHERE purchaseordernumber IS NOT NULL| >+ ); >+ if( $cnt ) { >+ say $out "We found $cnt order lines where field purchaseordernumber was filled!"; >+ $dbh->do( >+ q| >+CREATE TABLE zzaqorders_purchaseordernumber AS >+SELECT ordernumber,purchaseordernumber FROM aqorders WHERE purchaseordernumber IS NOT NULL| >+ ); >+ say $out q|These records have been copied to table: zzaqorders_purchaseordernumber. >+Please examine the data and remove this table.|; >+ } >+ > $dbh->do(q{ALTER TABLE aqorders DROP COLUMN purchaseordernumber}); > } > }, >-- >2.30.2
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 36002
:
161779
|
161780
|
161781
|
161782
|
164938
|
164939
|
164940
|
164941
|
165386
|
165387
|
165388
|
165389
| 165853