Open amecreate opened 1 year ago
Fix error for long messages: pymysql.err.DataError: (1406, "Data too long for column 'last_message' at row 1")
frappe@ubuntu:~$ mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 14759 Server version: 10.2.36-MariaDB-1:10.2.36+maria~bionic-log mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>show databases; +--------------------+ | Database | +--------------------+ | _1bd3e0294da19198 | | information_schema | | mysql | | performance_schema | +--------------------+ 4 rows in set (0.00 sec)
MariaDB [(none)]> use _1bd3e0294da19198;
MariaDB [_1bd3e0294da19198]>
MariaDB [_1bd3e0294da19198]> SHOW COLUMNS FROM tabChat Room
;
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| name | varchar(140) | NO | PRI | NULL | |
| creation | datetime(6) | YES | | NULL | |
| modified | datetime(6) | YES | MUL | NULL | |
| modified_by | varchar(140) | YES | | NULL | |
| owner | varchar(140) | YES | | NULL | |
| docstatus | int(1) | NO | | 0 | |
| parent | varchar(140) | YES | MUL | NULL | |
| parentfield | varchar(140) | YES | | NULL | |
| parenttype | varchar(140) | YES | | NULL | |
| idx | int(8) | NO | | 0 | |
| room_name | varchar(140) | YES | | NULL | |
| type | varchar(140) | YES | | NULL | |
| members | text | YES | | NULL | |
| last_message | varchar(140) | YES | | NULL | |
| is_read | text | YES | | NULL | |
| guest | varchar(140) | YES | | NULL | |
| _user_tags | text | YES | | NULL | |
| _comments | text | YES | | NULL | |
| _assign | text | YES | | NULL | |
| _liked_by | text | YES | | NULL | |
+--------------+--------------+------+-----+---------+-------+
20 rows in set (0.00 sec)
MariaDB [_1bd3e0294da19198]>ALTER TABLE tabChat Room
MODIFY last_message text;
Query OK, 5 rows affected (0.08 sec)
Records: 5 Duplicates: 0 Warnings: 0
MariaDB [_1bd3e0294da19198]> commit; Query OK, 0 rows affected (0.00 sec)
MariaDB [_1bd3e0294da19198]> MariaDB [_1bd3e0294da19198]> quit; Bye frappe@ubuntu:~$
Its work for me...
Installed Apps Frappe Chat: v0.0.1 (main) ERPNext: v13.40.3 (version-13) Frappe Framework: v13.42.0 (version-13)
Salam dari Blok Wage Pasaleman Cirebon West Java… :)…
Frappe Chat: v0.0.1 (main) ERPNext: v13.24.0 (version-13) Frappe Framework: v13.24.0 (version-13)
To reproduce: send a long message
Error: pymysql.err.DataError: (1406, "Data too long for column 'last_message' at row 1")