Browse Source

Bug 20402: DBRev 17.12.00.042

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Jonathan Druart 6 years ago
parent
commit
d012552ab6
  1. 2
      Koha.pm
  2. 17
      installer/data/mysql/atomicupdate/oauth_tokens.perl
  3. 18
      installer/data/mysql/updatedatabase.pl

2
Koha.pm

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "17.12.00.041";
$VERSION = "17.12.00.042";
sub version {
return $VERSION;

17
installer/data/mysql/atomicupdate/oauth_tokens.perl

@ -1,17 +0,0 @@
$DBversion = 'XXX';
if (CheckVersion($DBversion)) {
if (!TableExists('oauth_access_tokens')) {
$dbh->do(q{
CREATE TABLE oauth_access_tokens (
`access_token` VARCHAR(191) NOT NULL,
`client_id` VARCHAR(191) NOT NULL,
`expires` INT NOT NULL,
PRIMARY KEY (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
});
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20402 - Implement OAuth2 authentication for REST API)\n";
}

18
installer/data/mysql/updatedatabase.pl

@ -15992,6 +15992,24 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 11317 - Add a new permission to access files stored on the server)\n";
}
$DBversion = '17.12.00.042';
if( CheckVersion( $DBversion ) ) {
if (!TableExists('oauth_access_tokens')) {
$dbh->do(q{
CREATE TABLE oauth_access_tokens (
`access_token` VARCHAR(191) NOT NULL,
`client_id` VARCHAR(191) NOT NULL,
`expires` INT NOT NULL,
PRIMARY KEY (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
});
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20402 - Implement OAuth2 authentication for REST API)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.

Loading…
Cancel
Save