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

(-)a/installer/data/mysql/atomicupdate/bug_37292.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "37292",
6
    description => "'oauth_access_tokens.expires' needs an index",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        if ( !index_exists( 'oauth_access_tokens', 'expires' ) ) {
12
            $dbh->do(
13
                q{
14
            ALTER TABLE `oauth_access_tokens` ADD INDEX `expires` (`expires`)
15
            }
16
            );
17
            say_success( $out, "Added new index on 'oauth_access_tokens.expires'" );
18
        }
19
    },
20
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 4971-4977 CREATE TABLE `oauth_access_tokens` ( Link Here
4971
  `access_token` varchar(191) NOT NULL COMMENT 'generarated access token',
4971
  `access_token` varchar(191) NOT NULL COMMENT 'generarated access token',
4972
  `client_id` varchar(191) NOT NULL COMMENT 'the client id the access token belongs to',
4972
  `client_id` varchar(191) NOT NULL COMMENT 'the client id the access token belongs to',
4973
  `expires` int(11) NOT NULL COMMENT 'expiration time in seconds',
4973
  `expires` int(11) NOT NULL COMMENT 'expiration time in seconds',
4974
  PRIMARY KEY (`access_token`)
4974
  PRIMARY KEY (`access_token`),
4975
  KEY `expires` (`expires`)
4975
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4976
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4976
/*!40101 SET character_set_client = @saved_cs_client */;
4977
/*!40101 SET character_set_client = @saved_cs_client */;
4977
4978
4978
- 

Return to bug 37292