MediumBlob in Laravel database schema

后端 未结 2 1107
迷失自我
迷失自我 2020-12-06 10:42

How can I create a Mediumblob within the Laravel schema builder ?

In the docs it says :

$table->binary(\'data\'); // BLOB equivalent          


        
2条回答
  •  庸人自扰
    2020-12-06 11:07

    The field is created but the file can not be inserted. And the following error is caused:

    #1118 - Row size too large (> 8126)

    Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format BLOB prefix of 768 bytes is stored inline.

提交回复
热议问题