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

(-)a/installer/data/mysql/atomicupdate/bug_32330.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "32330",
5
    description => "Add indexes to background_jobs table",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless ( index_exists('background_jobs', 'borrowernumber') ) {
10
            $dbh->do(q{
11
                ALTER TABLE `background_jobs` ADD INDEX `borrowernumber` (`borrowernumber`)
12
            });
13
        }
14
        unless ( index_exists('background_jobs', 'status') ) {
15
            $dbh->do(q{
16
                ALTER TABLE `background_jobs` ADD INDEX `status` (`status`)
17
            });
18
        }
19
    },
20
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +3 lines)
Lines 1041-1047 CREATE TABLE `background_jobs` ( Link Here
1041
  `enqueued_on` datetime DEFAULT NULL,
1041
  `enqueued_on` datetime DEFAULT NULL,
1042
  `started_on` datetime DEFAULT NULL,
1042
  `started_on` datetime DEFAULT NULL,
1043
  `ended_on` datetime DEFAULT NULL,
1043
  `ended_on` datetime DEFAULT NULL,
1044
  PRIMARY KEY (`id`)
1044
  PRIMARY KEY (`id`),
1045
  KEY `borrowernumber` (`borrowernumber`),
1046
  KEY `status` (`status`)
1045
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1047
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1046
/*!40101 SET character_set_client = @saved_cs_client */;
1048
/*!40101 SET character_set_client = @saved_cs_client */;
1047
1049
1048
- 

Return to bug 32330