tenantable
tenantable copied to clipboard
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.