Closed nafiesl closed 5 years ago
To solve this problem, we need to change the migration file stub. https://github.com/nafiesl/SimpleCrudGenerator/blob/948247c2fbf479328f8e2fd135225b4a2fe2a04b/src/stubs/database/migrations/migration-create.stub#L20
This line need to changed into
$table->unsignedBigInteger('creator_id');
Resolved with this commit e445fc866cee6b6761450d40254bafbc1dafb07f.
A facebook friend named Adhik Mulat, inform that he got following error (foreign key constraint) when on
artisan migrate
command after generate a model CRUD.This happened because in laravel 5.8 the default users table migration uses bigIncrement data type on id column. But in generated migration file (like image below) the foreign user_id colum still using integer (not big integer).
Laravel 5.8 users table migration file
Generated migration file