Hi dear roundcube community,
First of all, I wish you all a happy new year.
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:
should added. Is that handled automatically by composer? (It seems to be the case)
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?
As far as I can see here: https://github.com/roundcube/plugin-installer/blob/0.1.6/src/bin/rcubeinitdb... This problem is already handled for CREATE DATABASE statements and for CREATE SEQUENCE statements but not for REFERENCES statements as used in the automatic_addressbook plugin here:
https://github.com/sblaisot/automatic_addressbook/blob/master/SQL/mysql.init...
https://github.com/sblaisot/automatic_addressbook/blob/master/SQL/postgres.i...
I should be able to propose a PR on plugin_installer for that. Is there something more I need to be aware of before coding?
Best regards and keep making such a good webmail!
Sebastien
On 05.01.2020 01:41, Sébastien BLAISOT wrote:
I should be able to propose a PR on plugin_installer for that. Is there something more I need to be aware of before coding?
Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net]
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com