On 04/24/2014 10:52 AM, Rosali wrote:
could you please let me know why configurable table names have been removed from Roundcube 1.0? Currently it is only possible to prefix database tables. The old method was much more flexible. Is there a chance to get it back?
We want keep this as simple as possible. Custom table names are harder to handle in schema upgrades.
The installer script does already table name replacements. So, I don't see a reason why is would be complicate to extend it for configurable database names.
{{{
$this->config['db_prefix'] . $table;
}}}
... becomes ...
{{{
if (!empty($this->config['db_table_' . $table])) { $table = $this->config['db_table_' . $table]; } $this->config['db_prefix'] . $table;
}}}
... and ...
{{{
private function fix_table_names($sql, $DB) { if (empty($this->config['db_prefix'])) { return $sql; }
}}}
... becomes ...
{{{
private function fix_table_names($sql, $DB) { if (empty($this->config['db_prefix']) && empty($this->config['db_table_' . $table])) { return $sql; }
}}}
Any concerns?