Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run migration after selecting the database #337

Merged
merged 1 commit into from
May 13, 2024

Conversation

crynobone
Copy link
Member

Before

composer.json from laravel/laravel will create database/database.sqlite and run php artisan migrate before we even select the default database.

image

After

  1. Disable scripts during composer create-project to avoid above scenario.
  2. Run composer run post-root-package-install to copy .env.example to .env.
  3. Run php artisan key:generate
  4. Select the correct database using prompt.
  5. Run migration
CleanShot.2024-05-09.at.18.30.33.mp4

Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesss 👏

@taylorotwell taylorotwell merged commit 5fb6fb6 into master May 13, 2024
13 checks passed
@taylorotwell taylorotwell deleted the migrate-improvements branch May 13, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants