
Heh brew installation isn't the best....best to uninstall and install using NPM

After a brew reinstall appwrite
, I'm now on 2.0.2

Will try a deploy now

Yep, that worked - I guess 1.1.1 just didn't understand relationships

My first issue still stands, though

An attribute failed to create? If so, check the docket logs for the appwrite-worker-databases container

No, the first issue was when deleting a collection which has an attribute with a relationship, the connected collection is not accessible

What's the error?

500 - general_unknown

Appwrite logs say Collection not found

Although I tried to reproduce just now, and instead the field in the connected collection just went to undefined
I tried doing another deploy of both collections to make sure I had it set up the same way again, but that failed with ✗ Error Attribute deletion did not finish for too long.

And all the records and attributes are gone from collection2 except the connected attribute, which is stuck at "deleting"

OK, after starting from scratch with a new project, if collection1 gets deleted, the relationship in collection2 gets "stuck" - it can't be deleted properly, and can't be used, of course.
When creating a new record in collection2, I get the error Invalid document structure: Unknown attribute: "relationship_attribute"
. If I attempt to delete the relationship, the field no longer comes up when creating new documents, but that error still happens

What do the appwrite-worker-databases logs say?

Attribute not found
[critical] (Job{v1-database} | ID: e3a51dc161ca6f876f939a590bf03771 | DatabaseV1 | <LONG JSON STRING WHICH SEEMS TO BE A REPRESENTATION OF THE COLLECTION>) has failed Utopia\Database\Exception\Structure: Invalid document structure: Unknown attribute: "relatedCollection" in /usr/src/code/vendor/utopia-php/database/src/Database/Database.php:2823
Stack trace:
#0 /usr/src/code/app/workers/databases.php(228): Utopia\Database\Database->updateDocument(Object(Utopia\Database\Document), '1_7_relationship_attribute', Object(Utopia\Database\Document))
#1 /usr/src/code/app/workers/databases.php(44): DatabaseV1->deleteAttribute(Object(Utopia\Database\Document), Object(Utopia\Database\Document), Object(Utopia\Database\Document), '64decb60069911e...')
#2 /usr/src/code/src/Appwrite/Resque/Worker.php(122): DatabaseV1->run()
#3 /usr/src/code/vendor/resque/php-resque/lib/Resque/Job.php(201): Appwrite\Resque\Worker->perform()
#4 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(303): Resque_Job->perform()
#5 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(242): Resque_Worker->perform(Object(Resque_Job))
#6 /usr/src/code/vendor/resque/php-resque/bin/resque(185): Resque_Worker->work('0.1', false)
#7 {main}

Here's the collections
section of my appwrite.json
:

"collections": [
{
"$id": "collection1",
"$permissions": [],
"databaseId": "relationships-test-db",
"name": "collection1",
"enabled": true,
"documentSecurity": false,
"attributes": [
{
"key": "relationship_attribute",
"type": "string",
"status": "available",
"required": true,
"array": false,
"size": 20,
"default": null
}
],
"indexes": []
},
{
"$id": "collection2",
"$permissions": [],
"databaseId": "relationships-test-db",
"name": "collection2",
"enabled": true,
"documentSecurity": false,
"attributes": [
{
"key": "relationship_attribute",
"type": "relationship",
"status": "available",
"required": false,
"array": false,
"relatedCollection": "collection1",
"relationType": "manyToOne",
"twoWay": false,
"twoWayKey": "collection2",
"onDelete": "cascade",
"side": "parent"
},
{
"key": "demo_string",
"type": "string",
"status": "available",
"required": false,
"array": false,
"size": 20,
"default": null
}
],
"indexes": []
}
]

this happened right after deleting the collection or?

I'm not really sure when - I just went to check the logs when you asked about them. I'll go reproduce and check now

would you be able to create a github issue and in the reproduction steps, put the exat steps?

It happened when deleting the attribute

Can try if I remember some point next week

actually, let me see what i can do

here's the issue: https://github.com/appwrite/appwrite/issues/6012

Thanks
Recommended threads
- Queries Length Error.
Hi All, I am having a issues across my app with how i am getting data, and just wanted to check if this was an issues with the new changes on appwrite over the...
- The current user is not authorized to pe...
I'm just getting this error while it was working couple minutes ago, my users have permissions to access and create tables data but on some databases I'm just g...
- Web Console not showing Database Docs, b...
We have a User collection within Database. So Auth::User connects to Database::User. When we signup a user using apple sub, the Database::User is created, alo...
