mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Pass through queries
This commit is contained in:
parent
d5bd6a0475
commit
7249083152
2 changed files with 9 additions and 13 deletions
8
composer.lock
generated
8
composer.lock
generated
|
|
@ -4398,12 +4398,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/migration.git",
|
||||
"reference": "4b72f60c866898687035acf04cedef9fbe966d16"
|
||||
"reference": "f45c403ae8d81058118f363226df2cf9fa70a3ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/migration/zipball/4b72f60c866898687035acf04cedef9fbe966d16",
|
||||
"reference": "4b72f60c866898687035acf04cedef9fbe966d16",
|
||||
"url": "https://api.github.com/repos/utopia-php/migration/zipball/f45c403ae8d81058118f363226df2cf9fa70a3ba",
|
||||
"reference": "f45c403ae8d81058118f363226df2cf9fa70a3ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -4445,7 +4445,7 @@
|
|||
"issues": "https://github.com/utopia-php/migration/issues",
|
||||
"source": "https://github.com/utopia-php/migration/tree/fix-array-export"
|
||||
},
|
||||
"time": "2025-10-22T07:28:29+00:00"
|
||||
"time": "2025-10-22T09:45:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/mongo",
|
||||
|
|
|
|||
|
|
@ -139,10 +139,12 @@ class Migrations extends Action
|
|||
$migrationOptions = $migration->getAttribute('options');
|
||||
$dataSource = Appwrite::SOURCE_API;
|
||||
$database = null;
|
||||
$queries = [];
|
||||
|
||||
if ($source === Appwrite::getName() && $destination === DestinationCSV::getName()) {
|
||||
$dataSource = Appwrite::SOURCE_DATABASE;
|
||||
$database = $this->dbForProject;
|
||||
$queries = Query::parseQueries($migrationOptions['queries']);
|
||||
}
|
||||
|
||||
$migrationSource = match ($source) {
|
||||
|
|
@ -172,7 +174,8 @@ class Migrations extends Action
|
|||
$credentials['endpoint'] === 'http://localhost/v1' ? 'http://appwrite/v1' : $credentials['endpoint'],
|
||||
$credentials['apiKey'],
|
||||
$dataSource,
|
||||
$database
|
||||
$database,
|
||||
$queries,
|
||||
),
|
||||
CSV::getName() => new CSV(
|
||||
$resourceId,
|
||||
|
|
@ -210,6 +213,7 @@ class Migrations extends Action
|
|||
$options['bucketId'],
|
||||
$options['filename'],
|
||||
$options['columns'],
|
||||
$options['queries'],
|
||||
$options['delimiter'],
|
||||
$options['enclosure'],
|
||||
$options['escape'],
|
||||
|
|
@ -372,14 +376,6 @@ class Migrations extends Action
|
|||
);
|
||||
}
|
||||
|
||||
// Debug logging for CSV exports before shutdown
|
||||
if ($migration->getAttribute('destination') === DestinationCSV::getName()) {
|
||||
$statusCounters = $transfer->getStatusCounters();
|
||||
Console::info('CSV export transfer completed. Status counters: ' . json_encode($statusCounters));
|
||||
Console::info('CSV export options: ' . json_encode($migration->getAttribute('options')));
|
||||
Console::info('CSV export errors: ' . json_encode($destination->getErrors()));
|
||||
}
|
||||
|
||||
$destination->shutdown();
|
||||
$source->shutdown();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue