mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +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'));
|
$dsn = new DSN('mysql://' . $document->getAttribute('database', 'console'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var $dbForProject Database
|
||||||
|
*/
|
||||||
$dbForProject = $getProjectDB($document);
|
$dbForProject = $getProjectDB($document);
|
||||||
|
|
||||||
|
$dbForProject->disableValidation();
|
||||||
|
|
||||||
$projectCollectionIds = [
|
$projectCollectionIds = [
|
||||||
...\array_keys(Config::getParam('collections', [])['projects']),
|
...\array_keys(Config::getParam('collections', [])['projects']),
|
||||||
SQL::COLLECTION,
|
SQL::COLLECTION,
|
||||||
|
|
@ -531,9 +536,6 @@ class Deletes extends Action
|
||||||
$sharedTablesV1 = \in_array($dsn->getHost(), $sharedTablesV1);
|
$sharedTablesV1 = \in_array($dsn->getHost(), $sharedTablesV1);
|
||||||
$sharedTablesV2 = !$projectTables && !$sharedTablesV1;
|
$sharedTablesV2 = !$projectTables && !$sharedTablesV1;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var $dbForProject Database
|
|
||||||
*/
|
|
||||||
$dbForProject->foreach(Database::METADATA, function (Document $collection) use ($dbForProject, $projectTables, $projectCollectionIds) {
|
$dbForProject->foreach(Database::METADATA, function (Document $collection) use ($dbForProject, $projectTables, $projectCollectionIds) {
|
||||||
try {
|
try {
|
||||||
if ($projectTables || !\in_array($collection->getId(), $projectCollectionIds)) {
|
if ($projectTables || !\in_array($collection->getId(), $projectCollectionIds)) {
|
||||||
|
|
@ -635,6 +637,8 @@ class Deletes extends Action
|
||||||
$deviceForFunctions->delete($deviceForFunctions->getRoot(), true);
|
$deviceForFunctions->delete($deviceForFunctions->getRoot(), true);
|
||||||
$deviceForBuilds->delete($deviceForBuilds->getRoot(), true);
|
$deviceForBuilds->delete($deviceForBuilds->getRoot(), true);
|
||||||
$deviceForCache->delete($deviceForCache->getRoot(), true);
|
$deviceForCache->delete($deviceForCache->getRoot(), true);
|
||||||
|
|
||||||
|
$dbForProject->enableValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue