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

Make db:seed command prohibitable and mark it destructive #55231

Closed

Conversation

spawnia
Copy link
Contributor

@spawnia spawnia commented Apr 1, 2025

I think it is generally undesirable and potentially unsafe to execute seeders in production databases.

This change does two things:

  1. It allows fine-grained control to prohibit db:seed from running
  2. It includes db:seed in DB::prohibitDestructiveCommands

@spawnia spawnia force-pushed the db-seed-prohibitable-and-destructive branch from 3b48c17 to 523de15 Compare April 1, 2025 10:02
I think it is generally undesirable and potentially unsafe to execute seeders in production databases.

This change does two things:
1. It allows fine-grained control to prohibit `db:seed` from running
2. It includes `db:seed` in `DB::prohibitDestructiveCommands`
@spawnia spawnia force-pushed the db-seed-prohibitable-and-destructive branch from 523de15 to e7f0a5d Compare April 1, 2025 10:04
@devfrey
Copy link
Contributor

devfrey commented Apr 1, 2025

I'm not sure I agree with this change. Seeding is not inherently "destructive", while the other commands are.

@spawnia spawnia deleted the db-seed-prohibitable-and-destructive branch April 1, 2025 16:25
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