Skip to content
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

duplicate indexes when using same db #4

Open
leemason opened this issue Feb 4, 2016 · 0 comments
Open

duplicate indexes when using same db #4

leemason opened this issue Feb 4, 2016 · 0 comments

Comments

@leemason
Copy link
Owner

leemason commented Feb 4, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant