Bugzilla – Attachment 74434 Details for
Bug 20568
Add API key management interface for patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20568: (follow-up) Atomic update fix
Bug-20568-follow-up-Atomic-update-fix.patch (text/plain), 2.62 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-04-18 13:56:07 UTC
(
hide
)
Description:
Bug 20568: (follow-up) Atomic update fix
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-04-18 13:56:07 UTC
Size:
2.62 KB
patch
obsolete
>From 64b6a9fe552e5fe3f8e899e3d09d7b64056e122c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 18 Apr 2018 10:55:43 -0300 >Subject: [PATCH] Bug 20568: (follow-up) Atomic update fix > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../atomicupdate/bug_20568_api_keys.perl | 42 +++++++++---------- > 1 file changed, 20 insertions(+), 22 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_20568_api_keys.perl b/installer/data/mysql/atomicupdate/bug_20568_api_keys.perl >index 5748a01062..066a76cd85 100644 >--- a/installer/data/mysql/atomicupdate/bug_20568_api_keys.perl >+++ b/installer/data/mysql/atomicupdate/bug_20568_api_keys.perl >@@ -1,28 +1,26 @@ > $DBversion = "XXX"; > if(CheckVersion($DBversion)) { > >- $dbh->do(q{ >- DROP TABLE IF EXISTS api_keys; >- }); >- >- $dbh->do(q{ >- CREATE TABLE `api_keys` ( >- `id` INT(11) NOT NULL AUTO_INCREMENT, >- `patron_id` INT(11) NOT NULL, >- `client_id` VARCHAR(191) NOT NULL, >- `secret` VARCHAR(191) NOT NULL, >- `description` VARCHAR(255) NOT NULL, >- `active` TINYINT(1) DEFAULT 1 NOT NULL, >- PRIMARY KEY (`id`), >- UNIQUE KEY `client_id` (`client_id`), >- UNIQUE KEY `secret` (`secret`), >- KEY `patron_id` (`patron_id`), >- CONSTRAINT `api_keys_fk_patron_id` >- FOREIGN KEY (`patron_id`) >- REFERENCES `borrowers` (`borrowernumber`) >- ON DELETE CASCADE ON UPDATE CASCADE >- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >- }); >+ if (!TableExists('oauth_access_tokens')) { >+ $dbh->do(q{ >+ CREATE TABLE `api_keys` ( >+ `id` INT(11) NOT NULL AUTO_INCREMENT, >+ `patron_id` INT(11) NOT NULL, >+ `client_id` VARCHAR(191) NOT NULL, >+ `secret` VARCHAR(191) NOT NULL, >+ `description` VARCHAR(255) NOT NULL, >+ `active` TINYINT(1) DEFAULT 1 NOT NULL, >+ PRIMARY KEY (`id`), >+ UNIQUE KEY `client_id` (`client_id`), >+ UNIQUE KEY `secret` (`secret`), >+ KEY `patron_id` (`patron_id`), >+ CONSTRAINT `api_keys_fk_patron_id` >+ FOREIGN KEY (`patron_id`) >+ REFERENCES `borrowers` (`borrowernumber`) >+ ON DELETE CASCADE ON UPDATE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ }); >+ } > > $dbh->do(q{ > INSERT IGNORE INTO `systempreferences` >-- >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 20568
:
74179
|
74180
|
74229
|
74230
|
74231
|
74232
|
74233
|
74234
|
74235
|
74236
|
74248
|
74254
|
74255
|
74256
|
74257
|
74258
|
74259
|
74343
|
74344
|
74345
|
74346
|
74347
|
74348
|
74388
|
74389
|
74434
|
74454
|
74476
|
74477
|
74478
|
74479
|
74480
|
74481
|
74482
|
74486
|
74487
|
74488
|
74489
|
74490
|
74491
|
74492
|
74493
|
74494
|
74495
|
74496
|
74980
|
74981
|
75023
|
75186
|
75187
|
75188