laravel/installer

Removing unnecessary migration prompt when database connection settings are not configured

yourchocomate opened this issue · 1 comments

Problem: Fresh installation of laravel using any database driver rather than sqlite starts with an error of can't connect with database.

installer-default-web

Description:
Current installer database selection steps are -

  • Prompt to select database driver
  • Confirmation to run migration of default migrations

So, Here the problem arises, database selection is okay but asking for migration with default configuration is a bit silly I guess. It's better to ask the user if they want to configure the conncetion settings. And then migrate or not.

And my suggestive steps would be:

  • Prompt to select database driver
  • Confirmation to set custom connection setting
    • Yes: Prompt to enter the custom settings for (HOST, PORT, DATABASE, USERNAME, PASSWORD) and set default value for migration prompt to true
    • No: Set default value for migration prompt to false
  • Migration prompt

Comparison:

Default installer -
installer-default

Patched Installer -
installer-yourchocomate

Finally, default installer serves my first laravel project with Error on homepage. And patched installer serves project with fresh start

A PR can be made if approves.

@taylorotwell It would be best if you look for it and give a proper suggestion on this, Thank You

Heya. Please just attempt a PR with whatever you'd like to propose. Thanks