Open xyrintech opened 7 years ago
Any update for this? :)
Hi @xyrintech. Can you please confirm your tenants table on your master database plus paste the output from the command window. I cannot reproduce.
Well, its the same table that's being there in the migration in this package. All I did is just created tenants and further run the migration.
It seems to be a major bug in this. I have tried this with 2 different setups with following steps: 1) Installed this with composer. 2) Added provider 3) Create 2 tenants and further created their databases manually. 4) tried php artisan migrate --tenant=* Migration only happens for one tenant, for second tenant it shows that there is nothing to migrate.
Note: Both these tenants share the same database connection but different databases.
Please let me know if you need any further details to reproduce.
One another way to reproduce: 1) create 2 tenants and their respective database. Ex. Acme_1, Acme_2
2) Now run the migrations with --tenant=all
3) You will see that migrations are there on one database only. In order to verify, delete the Acme_2 database. Run the migrations again, there is no error in this.
4) Now run the migration like this - php artisan migrate --tenant=acme_2
You will find an error for database missing.
Hope this helps.
Never heard back from you :)
If you really need this feature you should rather do this programatically by getting the tenants from the database and run migrations on a loop for each tenant.
I am also having issues with this, any fixes yet?
Hi Guys,
Apologies for the delay in response. I will have a look at this when I'm back home tonight
Dan
Hi,
I had a bunch of issues whilst trying to fix the existing command, I have created a new command which is called by typing php artisan tenant:migrate
with an tenant option, like the old commands use.
Example: php artisan tenant:migrate --tenant=tenant1
Or to migrate all tenants: php artisan tenant:migrate --tenant=*
I need to convert the other migration commands such as down, reset etc into a custom command and then will get this released to you.
Dan
Great job, keep it up!
On Wed, 19 Sep 2018, 18:37 Dan Coleman, notifications@github.com wrote:
Hi,
I had a bunch of issues whilst trying to fix the existing command, I have created a new command which is called by typing php artisan tenant:migrate with an tenant option, like the old commands use.
Example: php artisan tenant:migrate --tenant=tenant1 Or to migrate all tenants: php artisan tenant:migrate --tenant=*
I need to convert the other migration commands such as down, reset etc into a custom command and then will get this released to you.
Dan
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DanTheDJ/multitenant/issues/7#issuecomment-422871946, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCgdKSFcOH_TBKUaHrwcjywsE_vaga5ks5ucnLPgaJpZM4ORJJ0 .
Any update on this?
php artisan migrate --tenant=* works only for first migration. I believe it is require to work on every tenant.