php - Laravel Migration return Incorrect table definition -
laravel migration return "incorrect table definition; there can 1 auto column , must defined key", why? link of code
damn, consider atomizing.
the second argument integer
values when creating migrations not length of field rather if should or should not autoincrement.
that's problem lies.
for example $table->integer('celular',15)->nullable();
. laravel assume want autoincrement since 15
truthy value , since mysql doesn't allow more 1 column autoincrement got error.
Comments
Post a Comment