I am the maintainer of the automatic_addressbook plugin (or at
least I used to be, as I don't have much time for it now, and I
would be happy to have it integrated in roundcube default plugins
if you want, but that's an other story) .
I regularly get issues from users regarding database prefix when
installing the plugin. I understand this is complicated to handle
when installing manually, but it seems to also be the case when
using composer (At least I got reports about failed SQL statements
when installing with composer)
As far as I can see, SQL statements in roundcube codebase have no
prefix, as my sql statements in my plugin. How are database prefix
handled when installing roundcube? How are they handled when
installing a plugin with composer? (ok, I found how, see below)
I have 2 concerns:
- One is table creation (CREATE TABLE statements), on which prefix
should added. Is that handled automatically by composer? (It seems
to be the case)
- The second one is foreign keys that reference roundcube standard
tables like REFERENCES`users`(`user_id`)
which should be changed to REFERENCES`PREFIX_users`(`user_id`).
Is that automatically handled by composer at plugin installation?
(It seems to be the missing one)
Is there any documentation for plugin coders on how to properly
handle plugins databases with references to standard roundcube
databases regarding database prefix?