Author Topic: No custom database tables  (Read 3505 times)

Offline amaze646

  • Newbie
  • *
  • Posts: 3
No custom database tables
« on: May 04, 2020, 05:34:01 AM »
Hello,

Im trying to move some old roundcube installation on newest version (new server). Old instance has custom database tables created for roundcube that seems that are not recongised on new installation.

For example i have this defined in my configuration:
$rcmail_config['db_table_users'] = 'user_view';
$rcmail_config['db_table_userswrite'] = 'user_w';

But I get this error bellow. From what I can see, roundcube still uses users table instead user_view:

LINE 1: SELECT * FROM "users" WHERE "mail_host" = 'my.hostename.com...
                      ^ (SQL Query: SELECT * FROM "users" WHERE "mail_host" = 'my.hostename.com' AND "username" = 'myusername') in /var/www/roundcube/program/lib/Roundcube/rcube_db.php on line 543 (POST /?_task=login&_action=login)


Are those custom database table definitions still enabled on new roundcube versions? My old version is 0.8.5, version on new server is 1.4.3

Thank you and kind regards,
Igor

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: No custom database tables
« Reply #1 on: May 04, 2020, 11:52:51 AM »
The db_table_*/db_sequence_* options where removed in version 1.0 and replaced with a single db_prefix option. See https://github.com/roundcube/roundcubemail/commit/399db1b647e14947e97a865c09215969f56a7efe
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline amaze646

  • Newbie
  • *
  • Posts: 3
Re: No custom database tables
« Reply #2 on: May 04, 2020, 03:14:39 PM »
Hello,

thank you for your anwser!

So it is not possible to assign table names with different names than default anymore? In this case, user_view for example.

Kind regards,
Igor

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: No custom database tables
« Reply #3 on: May 05, 2020, 12:10:03 PM »
The prefix is applied to all tables so while you cannot completely change the name of the table you can customize with a prefix. eg. `rcdb_users`.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…