jeudi 13 juin 2019

is there any other why to fix the error of migration except define "Schema::defaultStringLength(191)" in boot function

most of the beginners face the problem of migration error when they trigger the command make:migrate first time and they don't get any clue. error is basically something related to max length of string, there are different solution to solve this.

some of solve it by

 ` public function boot()  {
        Schema::defaultStringLength(191);
    }

`

why we have to set it by manually ,why by default it's not like any other datatype length?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire