kitloong / laravel-migrations-generator

Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
MIT License
2.43k stars 269 forks source link

Laravel 8 - MariaDB error when generating stored procedures migration #197

Closed claudio-amped closed 6 months ago

claudio-amped commented 7 months ago

Hello,

I'm running laravel 8 with mariadb when I launch the generator it returns this error:

Setting up Stored Procedures migrations.
 TypeError 

  Argument 2 passed to KitLoong\MigrationsGenerator\Repositories\Entities\ProcedureDefinition::__construct() must be of the type string, null given, called in /var/www/html/vendor/kitloong/laravel-migrations-generator/src/Repositories/MySQLRepository.php on line 136

  at vendor/kitloong/laravel-migrations-generator/src/Repositories/Entities/ProcedureDefinition.php:13

all other files are generated as expected. Thanks for any help.

I'm running on docker with

claudio-amped commented 7 months ago

Update

Solved changing the definer of the procedure to match the user in the DB connection. I suggest to add a privilege check before starting the operation.