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 4160-4165 CREATE TABLE library_groups ( Link Here
4160
    UNIQUE KEY title ( title )
4160
    UNIQUE KEY title ( title )
4161
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4161
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4162
4162
4163
--
4164
-- Table structure for table 'oauth_access_tokens'
4165
--
4166
4167
DROP TABLE IF EXISTS `oauth_access_tokens`;
4168
CREATE TABLE `oauth_access_tokens` (
4169
    `access_token` VARCHAR(191) NOT NULL, -- generarated access token
4170
    `client_id`    VARCHAR(191) NOT NULL, -- the client id the access token belongs to
4171
    `expires`      INT NOT NULL,          -- expiration time in seconds
4172
    PRIMARY KEY (`access_token`)
4173
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4174
4163
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4175
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4164
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4176
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4165
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4177
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4166
- 

Return to bug 20402