Database gets stuck in migration with seeder on production with --force in Laravel 5

前端 未结 2 1424
天命终不由人
天命终不由人 2020-12-20 00:52

Database gets stuck in migration with seeder on production with --force in Laravel. Same effect I have on Laravel Homestead and EC2 AWS running Amazone linux. No messages in

相关标签:
2条回答
  • 2020-12-20 01:20

    I had same issue running php artisan migrate and nothing happens, stays stuck. --force or verbose wouldn't help.

    The problem I had is the DB_PORT in .env was not set correctly.

    0 讨论(0)
  • 2020-12-20 01:31

    Try including the -vvv flag in your migration command, this will increase the verbosity of any messages, which might uncover the problem.

    --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

    $ php artisan migrate --force

    As for the problem itself, try including the --force flag in your db:seed call, as you have included it in the migration.

    Artisan::call('db:seed', ['--class' => 'ProductsSeeder', '--force' => true,]);

    0 讨论(0)
提交回复
热议问题