Comments (10)
Hey!
Thanks for opening the issue. This doesn't seem to be a bug in package, seems to be related to your setup.
If you need quick support, you can visit our Discord community here: https://archte.ch/discord
The issue here is likely that you are telling tenancy to use the central
connection but you didn't create it in config/database.php
. If you did, then make sure your config cache in production is up to date.
Thanks
from tenancy.
Hey!
Thanks for opening the issue. This doesn't seem to be a bug in package, seems to be related to your setup.
If you need quick support, you can visit our Discord community here: https://archte.ch/discord
The issue here is likely that you are telling tenancy to use the
central
connection but you didn't create it inconfig/database.php
. If you did, then make sure your config cache in production is up to date.Thanks
Hello, thanks for the quick reply.
I have nowhere defined central
connection, I merely thought that it's managed by the package itself. Strange, though. It happens only acting on central domain from the tenant's context.
from tenancy.
It's not. It uses DB_CONNECTION
https://github.com/archtechx/tenancy/blob/3.x/assets/config.php#L42 by default and if you want to use a custom one, you can set it in this config.
The package manages the tenant
connection, but it needs a central connection to work with — it has no way to create that.
from tenancy.
Hi once again,
as far as I can comprehend, I think this one has to do still with the package. I can reassure that nowhere I have a "central" connection. Please ignore this thread w/o hesitation if you feel like it's ok on the package side, you know, I have no real proof that it's coming from the package.
However, please see the following screenshot:
Sorry for any incovenience caused. I am not finding anything related in the internet about this problem. On other projects, it does not happen at all.
from tenancy.
Check that the environment variable and the config key I linked are set properly.
from tenancy.
The current value of DB_CONNECTION
in my .env
is mysql
, so it's: DB_CONNECTION=mysql
.
I am not sure if I can comprehend what should I verify.
EDIT: so in the tenancy.php
config file, I should modify the central
value akin to .env
, meaning mysql
?
from tenancy.
I'm asking what the config key looks like, not saying you should modify it.
from tenancy.
It is exactly the same as you've shown in the link: 'central_connection' => env('DB_CONNECTION', 'central'),
from tenancy.
No idea then, something else must be misconfigured on your end.
from tenancy.
Shouldn't that be exactly as "DB_DONNECTION" of the .env
? Maybe a cache miss here-and-there, and when it can't get the value from .env
using env()
method, it gets "central" DB even though it's not correct.
Thank you for assistance, though.
from tenancy.
Related Issues (20)
- Tenant could not be identified on domain 127.0.0.1 HOT 1
- Possible performance issues with central queues? HOT 2
- Issue with global cache HOT 1
- Issue with the cache in multithread HOT 2
- Queued Notifications are not tenant aware and produces wrong Action links HOT 2
- tenants:run with jobs combined with queue:work keeps multiple database connections open HOT 12
- SQLSTATE[HY000] [2002] Connection refused
- bug in Request data identification HOT 1
- any_name.host_name shows my tenant landing page HOT 1
- Tenant cannot be created HOT 1
- i can't getting any data from users table HOT 2
- Additional (foreign ID) column not updated in Tenant table HOT 2
- migrate-fresh command don't consider mysql-schema.dump file HOT 13
- Cache::increment('key'); return null HOT 10
- Weird dates in sqlite tenant database HOT 3
- Caching the existance of a tenants database HOT 2
- Help: Tenant schedule HOT 1
- Laravel spatie permissions issue HOT 4
- Foreign key configuration for `BelongsTo` or `HasMany` relationship. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tenancy.