Open pablozagni opened 4 years ago
1406 Data too long for column 'description'
That error is telling you that you're trying to put too much data into a column.
For example, if the data type for the description
column is a varchar
(which has max length of 255) and you are trying to put 300 characters in that column, it will throw that error.
What is the column/data type for the description
column?
Yes! Seeder is Generating 3 paragraph. The resoult is bigger than descriptin sice (I don´t remember your field definition) You should modify Seeder to fill the field with a smaller faker, like 2 paragraph ;-) Greets!
Make it to paragraph(2,true) for testing
runing php artisan migrate:refresh --seed I get SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'description' at row 1 (SQL: insert into
example
(name
,description
,status_id
) values (Velit architecto voluptates quam et., Qui voluptatibus possimus tenetur et sapiente esse distinctio. Alias est est ipsam dicta praesentium. Ducimus perspiciatis aut enim nobis suscipit enim ducimus. Consequatur ipsa sit nulla exercitationem reiciendis qui placeat. Voluptatum consequatur molestias ex voluptatem., 4))I've fixed it changing \database\seeds\ExampleSeeder.php 'description' => $faker->paragraph(3,true), to 'description' => $faker->paragraph(2,true),
Thanks!