mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
disables validations
This commit is contained in:
parent
3b5b15d1a6
commit
1b855d2d41
1 changed files with 7 additions and 3 deletions
|
|
@ -516,8 +516,13 @@ class Deletes extends Action
|
|||
$dsn = new DSN('mysql://' . $document->getAttribute('database', 'console'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @var $dbForProject Database
|
||||
*/
|
||||
$dbForProject = $getProjectDB($document);
|
||||
|
||||
$dbForProject->disableValidation();
|
||||
|
||||
$projectCollectionIds = [
|
||||
...\array_keys(Config::getParam('collections', [])['projects']),
|
||||
SQL::COLLECTION,
|
||||
|
|
@ -531,9 +536,6 @@ class Deletes extends Action
|
|||
$sharedTablesV1 = \in_array($dsn->getHost(), $sharedTablesV1);
|
||||
$sharedTablesV2 = !$projectTables && !$sharedTablesV1;
|
||||
|
||||
/**
|
||||
* @var $dbForProject Database
|
||||
*/
|
||||
$dbForProject->foreach(Database::METADATA, function (Document $collection) use ($dbForProject, $projectTables, $projectCollectionIds) {
|
||||
try {
|
||||
if ($projectTables || !\in_array($collection->getId(), $projectCollectionIds)) {
|
||||
|
|
@ -635,6 +637,8 @@ class Deletes extends Action
|
|||
$deviceForFunctions->delete($deviceForFunctions->getRoot(), true);
|
||||
$deviceForBuilds->delete($deviceForBuilds->getRoot(), true);
|
||||
$deviceForCache->delete($deviceForCache->getRoot(), true);
|
||||
|
||||
$dbForProject->enableValidation();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue