mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
add relations into attributes collection
This commit is contained in:
parent
5aff6969db
commit
e2d3c95fa6
1 changed files with 2 additions and 1 deletions
|
|
@ -159,13 +159,14 @@ class DatabaseV1 extends Worker
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available'));
|
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available'));
|
||||||
|
// todo: needs to clean cache for related colllection?
|
||||||
|
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
Console::error($th->getMessage());
|
Console::error($th->getMessage());
|
||||||
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'failed'));
|
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'failed'));
|
||||||
|
|
||||||
if (Database::VAR_RELATIONSHIP === $type) {
|
if (Database::VAR_RELATIONSHIP === $type) {
|
||||||
$dbForProject->updateDocument('attributes', $related->getId(), $related->setAttribute('status', 'failed'));
|
$dbForProject->updateDocument('attributes', $related->getId(), $related->setAttribute('status', 'failed'));
|
||||||
// todo: needs to clean cache for related colllection?
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
$target = Realtime::fromPayload(
|
$target = Realtime::fromPayload(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue