TiagoSilvaPereira / vemto-issues

Repository to track Vemto Issues
30 stars 0 forks source link

(PDOException(code: 22001): SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column #435

Closed AdamovicBoban closed 1 year ago

AdamovicBoban commented 1 year ago

Problem with MariaDB and utfmb4, when the string in the database is set as varchar(191), but when I enable factories and seeders, it tries to insert more than 191 characters. The faker string in the field is set as $faker->text({SIZE}). Can I change the SIZE variable and where? Or how can I modify Vemto to create a string of default length 191?

image

image

TiagoSilvaPereira commented 1 year ago

Hi @AdamovicBoban {SIZE} comes from the field size setting, which is 255 in the image you sent... so you can just change it to 191, or you can replace {SIZE} directly with the size you want: $faker->text(191) image

AdamovicBoban commented 1 year ago

Hi @TiagoSilvaPereira ,

yes, I understand that, but how do I set it so that the standard on Vemto is 191 and not 255. You don't think I should change it manually for each field, do you? :)

TiagoSilvaPereira commented 1 year ago

@AdamovicBoban There is no way to specify the default size, as this is the first we've heard of this issue. So yes, at the moment, the only way would be to modify field by field.

AdamovicBoban commented 1 year ago

Hi @TiagoSilvaPereira Do it in the next version. When is the next version coming out?

TiagoSilvaPereira commented 1 year ago

@AdamovicBoban, no ETA yet, I'm still working on it... version 2 is much more complex than v1, so I'm trying not to pressure myself with a release date... but it is quite advanced now. I hope to launch pre-alpha until September, but no promises yet