-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
tenant migration adds to landlord database #69
Comments
The problem could be your default connection. Try with |
@masterix21 thanks for the quick reply! |
sorry, my mistake. Try |
Did it solve your problems? |
@masterix21 I think this was also related to my other issue with telescope here. So here is what I did:
And it worked as expected but now I want to know why it does not work without the |
Without the database parameter, Laravel will use your default connection (specified in your .env file |
I am doing Running it with the |
yes, I know. Trust me, it is better to specify the database in your migration command. You can also specify a path to separate your tenant migrations from landlord migrations. For example, you could have these directories: And doing it: It is a way to keep your code well organized. |
I haven't looked at this issue in detail, but I welcome improvements to our docs to guide people better around how migrations should be handled. |
Ok, I will do it |
I totally agree with you. Even if I solve it, I will be running my production migrations with the path and database params but it is a nice to have thing 😄 Thanks again for your help. I think it is better to have a github page linking to different gist for different tasks and that way this package will be easier to pickup for beginners like me (SwitchTenantTelescopeTask, SwitchTenantS3BucketTask, etc). I will be happy to build that but I think @freekmurze or @masterix21 have to get the credit for the amazing work. |
@freekmurze does all dirty job: I am only a contributor like could be you too. Thank you. |
Adding it to the docs is also good but it will make users think that these tasks are suggested by this package which is not and the package wants to give freedom to users to make their own tasks how they want it. |
Thanks all for you feedback/work on this package 👍 |
Thanks! |
Hi,
Thanks for the great package!
I just started testing the package and created some records directly into the
landlord.tenants
table and ranphp artisan tenants:artisan migrate
but it adds them to my landlord database (only once).here is my files and the settings I am using:
The text was updated successfully, but these errors were encountered: