Bugzilla – Attachment 74454 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.61 KB, created by
Julian Maurice
on 2018-04-18 15:47:17 UTC
(
hide
)
Description:
Bug 20568: (follow-up) Atomic update fix
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-04-18 15:47:17 UTC
Size:
2.61 KB
patch
obsolete
>From b19dcb179f813c0aa7171166c19e0fe9698dfe83 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> >--- > .../mysql/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..8cc0bf1f05 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('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; >+ }); >+ } > > $dbh->do(q{ > INSERT IGNORE INTO `systempreferences` >-- >2.14.2
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