-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Adds opt-in seeding #404
base: main
Are you sure you want to change the base?
Adds opt-in seeding #404
Conversation
This will not work in production. it got an error when APP_ENV=production 🚀 Running seeders...
APPLICATION IN PRODUCTION.
WARN Command cancelled. should change it to php ${APP_BASE_DIR}/artisan db:seed --force |
Shouldn't work on production. That's a feature. If you need seeding on production you have to do it manually. |
Would really like to see this implemented @jaydrogers |
Can add --force to get round that. |
I wouldn't. Rather, I would let the user create their own logic for seeding a production database. This is because seeding is meant to fake records, and doing so in production can mix up real records. This is great for staging or testing environments, tho, which is the main goal for this. |
I see the use case for this now and I really like this. Let me evaluate this for v3.6 and I will keep you all posted 👍 |
This adds the ability to seed the database.
Laravel can seed the database without confirmation when the application is not on production. By using this ability to confirm, the seeding can be enabled by setting
AUTORUN_LARAVEL_SEED
to eithertrue
or the class name of the Database Seeder.This step runs after the migration step.