I have a problem inserting a record with 10 fields of MediumBlob and a title. The error occurs when the title is more than 5 characters. I am free to add any images into the blobs. but the error raises when the title become just more than 5 characters... The error is as below:
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size to 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
you should show the output of 'show create table 'table_name' but the error also suggests what you can do to fix the problem to be honest
ALTER TABLE `test` ROW_FORMAT=DYNAMIC;
In laravel schema builder will not allow to specify the Row format. You need to use a raw db statement after the table creation
Schema::create("<table name>", function($table) {
// here you do all columns supported by the schema builder
});
// once the table is created use a raw query to ALTER it and add the MEDIUMBLOB
DB::statement("ALTER TABLE <table name> ROW_FORMAT=DYNAMIC");