Zammad database prefix

Is there a way for us to add a database prefix to zammad tables? It would be useful to add zammad to an existing database - and a database prefix removes the risk of duplicate table names.

Any help is appreciated, or if this is something planned for ahead?

Mixing Zammad databases from different instances into the same zammad database sounds like a bad idea. Instead: why not create a new database with a different name, import the Zammad contents in that database and point config/database.yml to that specific database? You should be able to keep them logically separated on the same database server, and without having to resort to custom prefixed table names.

This is also helpful in maintaining proper access control, as you will be able to have separate user accounts and passwords for database access and you can restrict access for each Zammad instance to their specific database, without having to mess around with specific GRANTs on the various tables (relations/sequences/etc).

Also, when backing up (or restoring your database from backup), you have much more fine-grained control over the data and it will be much easier to differentiate between the various Zammad instances.

Thanks Dvan (albeit a late in thanking) and appreciate your feedback!

First - just to ensure, we are on the same page - we, at our end are trying to integrate Zammad application with our core system

Second, the reason we asked was with other applications we had the ability to create a prefix and so use the same database as our core system with the goal of creating an integrated system. But I do see merit in keeping it logically separate as well as you suggested.

Just a followup question though - I do see a lot of open questions on the web about maintaining 1 database vs multiple. Based on my findings, I thought that keeping single vs multiple was better as there wasn’t much performance benefit otherwise + helps in building an integrated view of the system (if one is looking for). Any thoughts on this front?

The biggest advantage of independent databases per application is it allowing you to strictly divide in between your applications. This doesn’t just allow you to have restrictive permissions (and tighter control over access!) but also do avoid “oops situations” affecting basically everything you have.

Zammad does come with commands that potentially drop your whole database. Honestly, if I were you I’d use a own database.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.