Back

[SOLVED] Getting error message, ` Message: Data too long for column`

  • 0
  • Databases
Vedsaga
15 Jun, 2023, 23:24
TypeScript
appwrite  | [Error] Timestamp: 2023-06-15T23:18:55+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
appwrite  | [Error] Type: PDOException
appwrite  | [Error] Message: Data too long for column 'treatmentStatus' at row 1
appwrite  | [Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
appwrite  | [Error] Line: 64
appwrite  | [Error] Timestamp: 2023-06-15T23:21:11+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
appwrite  | [Error] Type: PDOException
appwrite  | [Error] Message: Data too long for column 'treatmentStatus' at row 1
appwrite  | [Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
appwrite  | [Error] Line: 64
appwrite  | [Error] Timestamp: 2023-06-15T23:21:34+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
appwrite  | [Error] Type: PDOException
appwrite  | [Error] Message: Data too long for column 'treatmentStatus' at row 1
appwrite  | [Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
appwrite  | [Error] Line: 64

tried, restarting the server still didn't solved.

The feild name treatmentStatus is Enum type which have two status

TL;DR
Issue: Getting a "Data too long for column" error message when trying to create a document in the Appwrite database using Appwrite version 1.3.7. Solution: 1. The error is likely caused by an enum being updated to include a value that is longer than the previous sizes. A GitHub issue has been created to address this: <https://github.com/appwrite/appwrite/issues/5595>. Consider following and contributing to the issue. 2. Delete the "treatmentStatus" field and recreate it. This has resolved the issue for some users. Additional Information: - Restarting the server did not solve
Vedsaga
15 Jun, 2023, 23:24

Appwrite version, is lates 1.3.7

Vedsaga
15 Jun, 2023, 23:44
TypeScript

code:
500
message:
"Server Error"
response:
Map (4 items)
type:
"general_unknown"

At the app-level

Vedsaga
15 Jun, 2023, 23:51

it's sorted after deleting treatmentStatus and recreating

Vedsaga
15 Jun, 2023, 23:51

<SOLVED>Getting error message, Message: Data too long for column

Drake
16 Jun, 2023, 00:44

[SOLVED] Getting error message, Message: Data too long for column

Drake
16 Jun, 2023, 00:47

FYI, this is probably due to an enum being updated to include a value that is longer than the previous sizes. You might want to πŸ‘πŸΌ this issue: https://github.com/appwrite/appwrite/issues/5595

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