* migration fix for tablesdb, legacy with multitype callback

* updated patch script
This commit is contained in:
ArnabChatterjee20k
2025-10-10 20:29:05 +05:30
parent 34e4208b3e
commit 2d41a3353d
2 changed files with 5 additions and 13 deletions
Generated
+4 -4
View File
@@ -4350,12 +4350,12 @@
"source": {
"type": "git",
"url": "https://github.com/utopia-php/migration.git",
"reference": "262c1c2c72d7429e504cde53b2b1774da8e9998c"
"reference": "f072649b1102b3657f6624fac4e9a0ababfceeee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/262c1c2c72d7429e504cde53b2b1774da8e9998c",
"reference": "262c1c2c72d7429e504cde53b2b1774da8e9998c",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/f072649b1102b3657f6624fac4e9a0ababfceeee",
"reference": "f072649b1102b3657f6624fac4e9a0ababfceeee",
"shasum": ""
},
"require": {
@@ -4398,7 +4398,7 @@
"issues": "https://github.com/utopia-php/migration/issues",
"source": "https://github.com/utopia-php/migration/tree/feat-documents-db"
},
"time": "2025-10-07T14:52:08+00:00"
"time": "2025-10-10T14:52:21+00:00"
},
{
"name": "utopia-php/mongo",
+1 -9
View File
@@ -8,7 +8,6 @@ use Throwable;
use Utopia\CLI\Console;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\System\System;
class V23 extends Migration
{
@@ -50,14 +49,7 @@ class V23 extends Migration
$this->dbForProject->updateDocuments('databases', new Document(['type' => 'legacy']));
// database dsn
$database = System::getEnv('_APP_DATABASE_NAME', 'appwrite');
$namespace = System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', '');
$schema = System::getEnv('_APP_DB_HOST', 'mariadb');
$dsn = $schema . '://' . $database;
if (!empty($namespace)) {
$dsn .= '?namespace=' . $namespace;
}
$this->createAttributeFromCollection($this->dbForProject, 'databases', 'database');
$this->dbForProject->updateDocuments('databases', new Document(['database' => $dsn]));
$this->dbForProject->updateDocuments('databases', new Document(['database' => $this->project->getAttribute('database')]));
}
}