Bugzilla – Attachment 131109 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.14 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-02-25 10:35:47 UTC
(
hide
)
Description:
Bug 30182: Make background_jobs.status an ENUM
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-02-25 10:35:47 UTC
Size:
2.14 KB
patch
obsolete
>From 9a613ad8425e636f1f629d7860352a868fae1bf1 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> >--- > .../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 34a6a9665d..87303009fb 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -971,7 +971,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.35.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 30182
:
131109
|
131110
|
135327
|
135330
|
135331