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

(-)a/installer/data/mysql/atomicupdate/oauth_tokens.perl (-10 / +12 lines)
Lines 1-15 Link Here
1
$DBversion = 'XXX';
1
$DBversion = 'XXX';
2
if (CheckVersion($DBversion)) {
2
if (CheckVersion($DBversion)) {
3
    $dbh->do(q{DROP TABLE IF EXISTS oauth_access_tokens});
3
4
    $dbh->do(q{
4
    if (!TableExists('oauth_access_tokens')) {
5
        CREATE TABLE oauth_access_tokens (
5
        $dbh->do(q{
6
            access_token VARCHAR(255) NOT NULL,
6
            CREATE TABLE oauth_access_tokens (
7
            client_id VARCHAR(255) NOT NULL,
7
                `access_token` VARCHAR(191) NOT NULL,
8
            expires INT NOT NULL,
8
                `client_id`    VARCHAR(191) NOT NULL,
9
            PRIMARY KEY (access_token)
9
                `expires`      INT NOT NULL,
10
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8
10
                PRIMARY KEY (`access_token`)
11
    });
11
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
12
        });
13
    }
12
14
13
    SetVersion( $DBversion );
15
    SetVersion( $DBversion );
14
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
16
    print "Upgrade to $DBversion done (Bug 20402 - Implement OAuth2 authentication for REST API)\n";
15
}
17
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +12 lines)
Lines 4161-4166 CREATE TABLE library_groups ( Link Here
4161
    UNIQUE KEY title ( title )
4161
    UNIQUE KEY title ( title )
4162
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4162
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4163
4163
4164
--
4165
-- Table structure for table 'oauth_access_tokens'
4166
--
4167
4168
DROP TABLE IF EXISTS `oauth_access_tokens`;
4169
CREATE TABLE `oauth_access_tokens` (
4170
    `access_token` VARCHAR(191) NOT NULL, -- generarated access token
4171
    `client_id`    VARCHAR(191) NOT NULL, -- the client id the access token belongs to
4172
    `expires`      INT NOT NULL,          -- expiration time in seconds
4173
    PRIMARY KEY (`access_token`)
4174
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4175
4164
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4176
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4165
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4177
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4166
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4178
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4167
- 

Return to bug 20402