Bugzilla – Attachment 135330 Details for
Bug 30182
background_jobs.status should be an ENUM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30182: Make background_jobs.status an ENUM
Bug-30182-Make-backgroundjobsstatus-an-ENUM.patch (text/plain), 2.18 KB, created by
David Nind
on 2022-05-24 19:23:08 UTC
(
hide
)
Description:
Bug 30182: Make background_jobs.status an ENUM
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-05-24 19:23:08 UTC
Size:
2.18 KB
patch
obsolete
>From b9e9f4a380d5f20723dba19d724ec8f5c406210d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 25 Feb 2022 07:32:26 -0300 >Subject: [PATCH] Bug 30182: Make background_jobs.status an ENUM > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../data/mysql/atomicupdate/bug_30182.pl | 27 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 28 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_30182.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30182.pl b/installer/data/mysql/atomicupdate/bug_30182.pl >new file mode 100755 >index 0000000000..3079761d3a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30182.pl >@@ -0,0 +1,27 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "30182", >+ description => "Make background_jobs.status an ENUM", >+ up => sub { >+ my ($args) = @_; >+ my $dbh = $args->{dbh}; >+ >+ $dbh->do( >+ q{ >+ ALTER TABLE >+ `background_jobs` >+ MODIFY COLUMN >+ `status` ENUM( >+ 'new', >+ 'started', >+ 'finished', >+ 'cancelled' >+ ) COLLATE utf8mb4_unicode_ci >+ NOT NULL >+ DEFAULT 'new' >+ COMMENT 'Job status' >+ } >+ ); >+ }, >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 852d448804..6c5bbd3718 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -976,7 +976,7 @@ DROP TABLE IF EXISTS `background_jobs`; > /*!40101 SET character_set_client = utf8 */; > CREATE TABLE `background_jobs` ( > `id` int(11) NOT NULL AUTO_INCREMENT, >- `status` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, >+ `status` ENUM('new','started','finished','cancelled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'new' COMMENT 'Job status', > `progress` int(11) DEFAULT NULL, > `size` int(11) DEFAULT NULL, > `borrowernumber` int(11) DEFAULT NULL, >-- >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 30182
:
131109
|
131110
|
135327
| 135330 |
135331