Giter Site home page Giter Site logo

leemason / tenantable Goto Github PK

View Code? Open in Web Editor NEW
81.0 81.0 28.0 28 KB

The Laravel Tenantable package is designed to enable multi-tenancy based database connections on the fly.

Home Page: http://leemason.github.io/tenantable

License: MIT License

PHP 100.00%

tenantable's People

Contributors

koenrijpstra avatar leemason avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tenantable's Issues

Store queued events in default connection

Hi,

I'm trying to store the queued events in the main connection (jobs table) while i'm in the tenant-connection. I've tried purging the tenant, so the main connection is established. However an error is triggered that the jobs table doesn't exist in the tenant database.

SQLSTATE[42S02]: Base table or view not found: 1146 Table '<tenant_database>.jobs' doesn't exist (SQL: insert into `jobs` (`queue`, `payload`....

Can you help me fixing this issue?

why do we need to purge connections ?

Hello,

Why is the connection purged (disconnected/reconnected) during an http request ? Is it a concurrency issue ?

Thanks in advance for your help
francois

duplicate indexes when using same db

this isnt something the package can deal with itself, this is just a reference for users.

basically if you use this package and have multiple tenants on the same db and simply change the prefixes of the tables you CAN run into duplicate index name issues:

SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table

This happens because the index name must be unique across the DATABASE, not the TABLE unfortunatley.

So unless you refactor all your index names to use the connection prefix you will be limited to not using indexes (not really an option). or splitting your tenants across multiple dbs.

Use local

How to use tenantable in localhost?

I create virtual hosts point to the same dir, but $resolver->getActiveTenant(); only return null.

Resolving tenants on subdomain

It would be nice if there is an option to resolve tenants on subdomain only. Setting the main domain somewhere in the config and only set the subdomain in the database. This would be great for setting up multiple environments.

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.