Skip to content

feat: add WipeDatabaseCommand for database management#594

Merged
SRWieZ merged 1 commit into
NativePHP:mainfrom
WINBIGFOX:add-db-wipe-command
Jun 22, 2025
Merged

feat: add WipeDatabaseCommand for database management#594
SRWieZ merged 1 commit into
NativePHP:mainfrom
WINBIGFOX:add-db-wipe-command

Conversation

@WINBIGFOX
Copy link
Copy Markdown
Contributor

Introduced the WipeDatabaseCommand to streamline database wiping in the NativePHP development environment.

Introduced the WipeDatabaseCommand to streamline database wiping in the NativePHP development environment.
{
protected $name = 'native:db:wipe';

protected $description = 'Wipe the database in the NativePHP development environment';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"In the development environment" - should this have a check for app()->isLocal()?

Could allow the --force flag if someone intends to use in production for safety?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would have thought that this check should be handled with the DB::prohibitDestructiveCommands() function.

https://laravel-news.com/prevent-destructive-commands-from-running-in-laravel-11

@SRWieZ SRWieZ merged commit e97a405 into NativePHP:main Jun 22, 2025
18 of 19 checks passed
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.

4 participants