Issue Feature Closed

#85739Reduce restrictions on database names introduced for DBAL

J. Peter M. Schuler 08/03/18, 10:00 updated 04/21/20, 12:16

Description

Since #51093 there are restrictions on database schema names which can be entered during initial TYPO3 setup:

Given database name must be shorter than fifty characters and consist solely of 
* basic latin letters (a-z), 
* digits (0-9), 
* dollar signs ($) 
* and underscores (_).

These restrictions come from mySQL unquoted identifier rules (https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). However all calls should be quoted anyways, so these restrictions could be dropped.

Background:

  1. From what I understood this was a move because of better DBAL support around the change from TYPO3 v6 to v7. Meanwhile Doctrine replaced the old DBAL approach.
  2. I don’t get this decision in the first place, as in the moment the database is created the underlying used driver is known and might allow a less restrictive naming (or in theory be even more restrictive). Additionally this was introduced because of mySQL, not because of some other DB.
  3. I stumbled upon this in a new deployment, realising that we have had systems running TYPO3 v6, v7 and v8 which actually had database names not following this approach (having multiple dots in their name). These databases were renamed sometime during a migration to another server and the string was changed in LocalConfiguration.php directly, so we never stumbled upon this restriction change. Nevertheless all these systems ran fine.

So is there a need to have this kind of restrictive naming anymore? I couldn’t find anything in the docs regarding this and the old reason seems to be outdated.

Reviews 1