Bugzilla – Attachment 160409 Details for
Bug 35682
Provide ability to specify color in DB upgrades
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35682: [TEST ONLY]: This is a dummy dbrev to force an update
Bug-35682-TEST-ONLY-This-is-a-dummy-dbrev-to-force.patch (text/plain), 2.75 KB, created by
Pedro Amorim
on 2024-01-02 16:01:44 UTC
(
hide
)
Description:
Bug 35682: [TEST ONLY]: This is a dummy dbrev to force an update
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-01-02 16:01:44 UTC
Size:
2.75 KB
patch
obsolete
>From 4caa133a44ab199d8f848f27016d8d68aaa8f4b2 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 2 Jan 2024 15:57:31 +0000 >Subject: [PATCH] Bug 35682: [TEST ONLY]: This is a dummy dbrev to force an > update > >--- > installer/data/mysql/db_revs/231200003.pl | 59 +++++++++++++++++++++++ > 1 file changed, 59 insertions(+) > create mode 100755 installer/data/mysql/db_revs/231200003.pl > >diff --git a/installer/data/mysql/db_revs/231200003.pl b/installer/data/mysql/db_revs/231200003.pl >new file mode 100755 >index 0000000000..1dcc34491e >--- /dev/null >+++ b/installer/data/mysql/db_revs/231200003.pl >@@ -0,0 +1,59 @@ >+use Modern::Perl; >+ >+use Term::ANSIColor qw(:constants); >+ >+return { >+ bug_number => "35539", >+ description => "Remove unused columns from 'categories' table", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( column_exists( 'categories', 'bulk' ) ) { >+ my ($bulkdata) = $dbh->selectrow_array( >+ q| >+ SELECT bulk FROM categories; >+ | >+ ); >+ if ($bulkdata) { >+ say $out YELLOW, >+ "Data was found in 'bulk' column in 'categories' table. Please remove this data and run the update again."; >+ } else { >+ $dbh->do("ALTER TABLE categories DROP COLUMN bulk"); >+ say $out "Removed 'bulk' column from 'categories' table"; >+ } >+ } >+ >+ if ( column_exists( 'categories', 'finetype' ) ) { >+ my ($bulkdata) = $dbh->selectrow_array( >+ q| >+ SELECT finetype FROM categories; >+ | >+ ); >+ if ($bulkdata) { >+ say $out YELLOW, >+ "Data was found in 'finetype' column in 'categories' table. Please remove this data and run the update again."; >+ } else { >+ $dbh->do("ALTER TABLE categories DROP COLUMN finetype"); >+ say $out "Removed 'finetype' column from 'categories' table"; >+ } >+ } >+ >+ if ( column_exists( 'categories', 'issuelimit' ) ) { >+ my ($bulkdata) = $dbh->selectrow_array( >+ q| >+ SELECT issuelimit FROM categories; >+ | >+ ); >+ if ($bulkdata) { >+ say $out YELLOW, >+ "Data was found in 'issuelimit' column in 'categories' table. Please remove this data and run the update again."; >+ } else { >+ $dbh->do("ALTER TABLE categories DROP COLUMN issuelimit"); >+ say $out "Removed 'issuelimit' column from 'categories' table"; >+ } >+ } >+ >+ say $out WHITE, "Bug 35539: All done."; >+ }, >+}; >-- >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 35682
: 160409 |
160410
|
160411