mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
* migration fix for tablesdb, legacy with multitype callback
* updated patch script
This commit is contained in:
Generated
+4
-4
@@ -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",
|
||||
|
||||
@@ -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')]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user