View | Details | Raw Unified | Return to bug 30182
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_30182.pl (+27 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "30182",
5
    description => "Make background_jobs.status an ENUM",
6
    up => sub {
7
        my ($args) = @_;
8
        my $dbh = $args->{dbh};
9
10
        $dbh->do(
11
            q{
12
                ALTER TABLE
13
                    `background_jobs`
14
                MODIFY COLUMN
15
                    `status` ENUM(
16
                        'new',
17
                        'started',
18
                        'finished',
19
                        'cancelled'
20
                    ) COLLATE utf8mb4_unicode_ci
21
                    NOT NULL
22
                    DEFAULT 'new'
23
                    COMMENT 'Job status'
24
              }
25
        );
26
    },
27
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 976-982 DROP TABLE IF EXISTS `background_jobs`; Link Here
976
/*!40101 SET character_set_client = utf8 */;
976
/*!40101 SET character_set_client = utf8 */;
977
CREATE TABLE `background_jobs` (
977
CREATE TABLE `background_jobs` (
978
  `id` int(11) NOT NULL AUTO_INCREMENT,
978
  `id` int(11) NOT NULL AUTO_INCREMENT,
979
  `status` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
979
  `status` ENUM('new','started','finished','cancelled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'new' COMMENT 'Job status',
980
  `progress` int(11) DEFAULT NULL,
980
  `progress` int(11) DEFAULT NULL,
981
  `size` int(11) DEFAULT NULL,
981
  `size` int(11) DEFAULT NULL,
982
  `borrowernumber` int(11) DEFAULT NULL,
982
  `borrowernumber` int(11) DEFAULT NULL,
983
- 

Return to bug 30182