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

Add --force option to MigrateFresh #1194

Open
justasbrandlions opened this issue Mar 14, 2024 · 1 comment
Open

Add --force option to MigrateFresh #1194

justasbrandlions opened this issue Mar 14, 2024 · 1 comment
Assignees
Labels
feature New feature or request

Comments

@justasbrandlions
Copy link

Bug description

No way to override in configs --force flag when running migrate-fresh. This might cause huge problems by accidentally running this command on production with hundreds of tenants.

Steps to reproduce

set .env to production and run php artisan tenants:migrate-fresh

Expected behavior

I'd expect tenants:migrate-fresh would ask me for confirmation on production env, but it's not. It sets the --force to true and removed all tenant DBs on production without any confirmation.

Laravel version

10

stancl/tenancy version

3.7

@justasbrandlions justasbrandlions added the bug Something isn't working label Mar 14, 2024
@stancl
Copy link
Member

stancl commented Mar 14, 2024

Not much point in this since if you're running migrate-fresh you're already explicitly asking for your data to be deleted, but I can add an argument for this.

@stancl stancl added feature New feature or request and removed bug Something isn't working labels Mar 14, 2024
@stancl stancl changed the title MigrateFresh sets --force to true even for production Add --force option to MigrateFresh Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants