laravel-shift/blueprint

Wrong faker for string column type with max chars

myregistration opened this issue · 1 comments

  • Laravel Version: 11
  • PHP Version: 8.3.4
  • Blueprint Version: 2.10
  • Platform: Mac

Issue:

Should a string column with max 50 characters create a faker with 'title' => $this->faker->sentence(4),? It seems like all the strings do this. Thanks!

draft.yaml:

  PetType:
    title: string:50

It's possible this fake value could be over 50 characters. However, it would simply be truncated by the database. The factories Blueprint produces are "guessed". As such, they may not be perfect values for your application. You are always encouraged to tweak them for your needs.