I have a table with a column \'hotel\'. The project is created in Laravel 5.4, so I used Migrations.
$table->string(\'hotel\', 50);
Thi
I was storing pictures as base64 on a text colum so I got a SQL error:
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'picture' at row 1
I did my migration as
$table->text('picture')
then I changed de column picture as:
$table->mediumText('picture')
I realiced that text column allows to store only 64 KB
TEXT: 65,535 characters - 64 KB MEDIUMTEXT: 16,777,215 - 16 MB LONGTEXT: 4,294,967,295 characters - 4 GB
For more info visit: understanding-strorage-sizes-for-mysql-text-data-types