Back

[SOLVED] Unable to create collections or create attributes on existing collections

  • 0
  • Databases
bugs_cena
15 Jul, 2023, 09:48

I have been facing some issues (HTTP 500 errors) while creating new collections and attributes. Same issue from both UI and cli.

While creating a new collection:

TypeScript
[Error] Line: 64
[Error] Timestamp: 2023-07-15T09:43:20+00:00
[Error] Method: POST
[Error] URL: /v1/databases/:databaseId/collections
[Error] Type: PDOException
[Error] Message: Unknown column 'documentSecurity' in 'field list'
[Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
[Error] Line: 64

While adding a new attribute on an existing collection:

TypeScript
[Error] Timestamp: 2023-07-15T09:32:00+00:00
[Error] Method: POST
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/attributes/string
[Error] Type: Utopia\Database\Exception\Structure
[Error] Message: Invalid document structure: Unknown attribute: "options"
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 2504

I was on appwrite 1.3.1 when I faced this issue. Later I upgraded to 1.3.3 -> 1.3.4 -> 1.3.5 -> 1.3.6 -> 1.3.7. Still seeing the same issue. Any help would be appreciated.

TL;DR
The user encountered HTTP 500 errors while trying to create collections and attributes on existing collections. They received error messages related to unknown columns and invalid document structures. The problem was solved by running the migration command ```docker compose exec appwrite migrate``` after upgrading to the latest patch.
bugs_cena
15 Jul, 2023, 16:30

Fixed this by running migration

TypeScript
docker compose exec appwrite migrate
D5
15 Jul, 2023, 16:39

[SOLVED] Unable to create collections or create attributes on existing collections

Drake
15 Jul, 2023, 21:28

Fyi, in the future, you can upgrade to the latest patch and run the migration for the latest patch

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more