Bugzilla – Attachment 74385 Details for
Bug 20402
OAuth2 client credentials grant for REST API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20402: Atomic update and kohastructure.sql fixes
Bug-20402-Atomic-update-and-kohastructuresql-fixes.patch (text/plain), 2.74 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-04-17 19:35:34 UTC
(
hide
)
Description:
Bug 20402: Atomic update and kohastructure.sql fixes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-04-17 19:35:34 UTC
Size:
2.74 KB
patch
obsolete
>From 61565d172df8525fb8f26f7172c54320e60a061f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 17 Apr 2018 16:23:36 -0300 >Subject: [PATCH] Bug 20402: Atomic update and kohastructure.sql fixes > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../data/mysql/atomicupdate/oauth_tokens.perl | 22 ++++++++++--------- > installer/data/mysql/kohastructure.sql | 12 ++++++++++ > 2 files changed, 24 insertions(+), 10 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/oauth_tokens.perl b/installer/data/mysql/atomicupdate/oauth_tokens.perl >index e22df6f9bd..070aed2573 100644 >--- a/installer/data/mysql/atomicupdate/oauth_tokens.perl >+++ b/installer/data/mysql/atomicupdate/oauth_tokens.perl >@@ -1,15 +1,17 @@ > $DBversion = 'XXX'; > if (CheckVersion($DBversion)) { >- $dbh->do(q{DROP TABLE IF EXISTS oauth_access_tokens}); >- $dbh->do(q{ >- CREATE TABLE oauth_access_tokens ( >- access_token VARCHAR(255) NOT NULL, >- client_id VARCHAR(255) NOT NULL, >- expires INT NOT NULL, >- PRIMARY KEY (access_token) >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 >- }); >+ >+ 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 XXXXX - description)\n"; >+ print "Upgrade to $DBversion done (Bug 20402 - Implement OAuth2 authentication for REST API)\n"; > } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6842eb580c..f8eb0b67bf 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4160,6 +4160,18 @@ CREATE TABLE library_groups ( > UNIQUE KEY title ( title ) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >+-- >+-- Table structure for table 'oauth_access_tokens' >+-- >+ >+DROP TABLE IF EXISTS `oauth_access_tokens`; >+CREATE TABLE `oauth_access_tokens` ( >+ `access_token` VARCHAR(191) NOT NULL, -- generarated access token >+ `client_id` VARCHAR(191) NOT NULL, -- the client id the access token belongs to >+ `expires` INT NOT NULL, -- expiration time in seconds >+ PRIMARY KEY (`access_token`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20402
:
72865
|
72874
|
72886
|
72887
|
72888
|
72892
|
72893
|
72894
|
73086
|
73087
|
74009
|
74018
|
74050
|
74051
|
74069
|
74070
|
74088
|
74365
|
74366
|
74367
|
74368
|
74369
|
74380
|
74381
|
74382
|
74383
|
74384
|
74385
|
74386
|
74600
|
75026
|
75027
|
75028
|
75029
|
75030
|
75031
|
75032
|
75033
|
75189