-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Seed after migration ignores --force flag in config/tenancy.php on production environment #367
Comments
I am having the same problem in production
El jue., 23 abr. 2020 a las 10:14, john-ibsa (<notifications@github.com>)
escribió:
… Describe the bug
We have an application running on 3 different environments. local, testing
and production. We use the seed_after_migration configuration and set '--force'
=> true. This works perfectly on all environments except production.
Steps to reproduce
You will be able to reproduce this issue by setting environment to
production, 'seed_after_migration' => true and '--force' => true. No
errors will be thrown, the database will not seed.
Expected behavior
The Database should seed as expected after migration.
Your setup
- Laravel 7.7.1
- stancl/tenancy 2.3.4
- Using Postgres
Workaround
When removing the following lines (46,47,48) from
Stancl\Tenancy\Commands\Seed.php this issue is not experienced. Is it
possible that the force flag is being ignored.
if (! $this->confirmToProceed()) {
return;
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#367>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBBFGTLKMLVMBZ32VWQDNDROBENNANCNFSM4MPC2ZLQ>
.
--
-----------------------------------------
Innovación, marketing Digital y negocios online, visita nuestro blog
<http://www.emprendery.com/blog>
-----------------------------------------
*Luis Antonio Mata B.*
*Socio - Fundador*
*www.emprendery.com <http://www.emprendery.com>*
*Skype:luisantoniomata*
*------------------------------------------*Telf: +56953470779
Santiago - Chile
|
As a temporary workaround we have added the following within the run section when creating a new tenant.
|
@john-ibsa Does moving this block https://github.com/stancl/tenancy/blob/2.x/src/Commands/Seed.php#L55-L59 To the start of the method (i.e. before the |
I'll be tagging 2.3.5 today. So if you can confirm that this fixes the problem for you, I'll make it part of the release. |
@stancl thanks for the quick response. This makes complete sense as the I have tested this update and confirmed this is now working as expected. Appreciated. |
Ah, last minute. Was just writing the release notes. Will include a patch in the release. |
I think I got that in about 12 seconds late :) Thanks @stancl |
Describe the bug
We have an application running on 3 different environments.
local
,testing
andproduction
. We use theseed_after_migration
configuration and set'--force' => true
. This works perfectly on all environments except production.Steps to reproduce
You will be able to reproduce this issue by setting environment to production,
'seed_after_migration' => true
and'--force' => true
. No errors will be thrown, the database will not seed.Expected behavior
The Database should seed as expected after migration.
Your setup
Workaround
When removing the following lines (46,47,48) from
Stancl\Tenancy\Commands\Seed.php
this issue is not experienced. Is it possible that the force flag is being ignored.The text was updated successfully, but these errors were encountered: