Laravel: String data, right truncated: 1406 Data too long for column

后端 未结 6 1561
予麋鹿
予麋鹿 2021-02-04 01:18

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

6条回答
  •  醉梦人生
    2021-02-04 01:45

    On your local development, try changing the column type to:

    $table->longText('columnName')
    

    from your migration file. That solved it for me. But if you have gone live, then create a new migration just as Alexey has suggested and then use longText() column type.

提交回复
热议问题