Giter Site home page Giter Site logo

Comments (10)

stancl avatar stancl commented on June 12, 2024

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.

thevalo avatar thevalo commented on June 12, 2024

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

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.

stancl avatar stancl commented on June 12, 2024

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.

thevalo avatar thevalo commented on June 12, 2024

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:
screenshot1

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.

stancl avatar stancl commented on June 12, 2024

Check that the environment variable and the config key I linked are set properly.

from tenancy.

thevalo avatar thevalo commented on June 12, 2024

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.

stancl avatar stancl commented on June 12, 2024

I'm asking what the config key looks like, not saying you should modify it.

from tenancy.

thevalo avatar thevalo commented on June 12, 2024

It is exactly the same as you've shown in the link: 'central_connection' => env('DB_CONNECTION', 'central'),

from tenancy.

stancl avatar stancl commented on June 12, 2024

No idea then, something else must be misconfigured on your end.

from tenancy.

thevalo avatar thevalo commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.