Skip to content

duplicate indexes when using same db #4

@leemason

Description

@leemason

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions