diff --git a/app/init/constants.php b/app/init/constants.php index e80d83b4f4..0d21b6d928 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -441,4 +441,8 @@ const DATABASE_TYPE_DOCUMENTSDB = 'documentsdb'; const DATABASE_TYPE_VECTORDB = 'vectordb'; // CSV import/export allowed database types -const CSV_ALLOWED_DATABASE_TYPES = [DATABASE_TYPE_LEGACY, DATABASE_TYPE_LEGACY, DATABASE_TYPE_VECTORDB]; +const CSV_ALLOWED_DATABASE_TYPES = [ + DATABASE_TYPE_LEGACY, + DATABASE_TYPE_TABLESDB, + DATABASE_TYPE_VECTORDB +]; diff --git a/app/init/registers.php b/app/init/registers.php index a9e65cb14d..699462e4d2 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -435,7 +435,7 @@ $register->set('db', function () { } catch (\Throwable $e) { throw new Exception(Exception::GENERAL_SERVER_ERROR, "MongoDB connection failed: " . $e->getMessage()); } - + case 'postgresql': $dsn = "pgsql:host={$dbHost};port={$dbPort};dbname={$dbSchema}"; break; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 8627fa49c5..8077d38918 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -92,6 +92,9 @@ class XList extends Action $cursor->setValue($cursorDocument); } + // use base action to get all types, contexts, etc! + $queries[] = Query::equal('type', [$this->getDatabaseType()]); + try { $databases = $dbForProject->find('databases', $queries); $total = $includeTotal ? $dbForProject->count('databases', $queries, APP_LIMIT_COUNT) : 0;