From d1eae375773c830e5d90bf47381faa687e24bdca Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 17 Nov 2022 14:57:27 +0100 Subject: [PATCH] fix: make migration for oauth providers non-destructive --- src/Appwrite/Migration/Version/V16.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Migration/Version/V16.php b/src/Appwrite/Migration/Version/V16.php index 070b8e7d92..e86561e42a 100644 --- a/src/Appwrite/Migration/Version/V16.php +++ b/src/Appwrite/Migration/Version/V16.php @@ -130,6 +130,10 @@ class V16 extends Migration } if (($authProviders[$provider . 'Appid'] ?? false) && ($authProviders[$provider . 'Secret'] ?? false)) { + if (array_key_exists($provider . 'Enabled', $authProviders)) { + continue; + } + $authProviders[$provider . 'Enabled'] = true; } }