mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Added method to delete DB namespace
This commit is contained in:
@@ -391,6 +391,9 @@ $utopia->delete('/v1/projects/:projectId')
|
||||
throw new Exception('Failed to remove project from DB', 500);
|
||||
}
|
||||
|
||||
// Delete all DBs
|
||||
$consoleDB->deleteNamespace($project->getUid());
|
||||
|
||||
$response->noContent();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -88,6 +88,14 @@ abstract class Adapter
|
||||
*/
|
||||
abstract public function createNamespace($namespace);
|
||||
|
||||
/**
|
||||
* Delete Namespace
|
||||
*
|
||||
* @param string $namespace
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function deleteNamespace($namespace);
|
||||
|
||||
/**
|
||||
* Filter
|
||||
*
|
||||
|
||||
@@ -154,6 +154,17 @@ class Redis extends Adapter
|
||||
return $this->adapter->createNamespace($namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Namespace
|
||||
*
|
||||
* @param string $namespace
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteNamespace($namespace)
|
||||
{
|
||||
return $this->adapter->deleteNamespace($namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
* @return array
|
||||
|
||||
@@ -95,6 +95,17 @@ class Database
|
||||
return $this->adapter->createNamespace($namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Namespace
|
||||
*
|
||||
* @param int $namespace
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteNamespace($namespace)
|
||||
{
|
||||
return $this->adapter->deleteNamespace($namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
* @return Document[]|Document
|
||||
|
||||
Reference in New Issue
Block a user