mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Skip credential defaulting for Appwrite -> Appwrite migrations
This commit is contained in:
@@ -488,7 +488,10 @@ class Migrations extends Action
|
||||
try {
|
||||
$credentials = $migration->getAttribute('credentials', []);
|
||||
|
||||
if ($migration->getAttribute('source') === SourceAppwrite::getName()) {
|
||||
// Appwrite -> Appwrite requires explicit user-supplied source credentials;
|
||||
// defaulting would silently self-call with the destination's own key.
|
||||
if ($migration->getAttribute('source') === SourceAppwrite::getName()
|
||||
&& $migration->getAttribute('destination') !== DestinationAppwrite::getName()) {
|
||||
$credentials['projectId'] = $credentials['projectId'] ?? $project->getId();
|
||||
$credentials['apiKey'] = $credentials['apiKey'] ?? $tempAPIKey;
|
||||
$credentials['endpoint'] = $credentials['endpoint'] ?? $endpoint;
|
||||
|
||||
Reference in New Issue
Block a user