Feature: #101553 - Auto-create DB fields from TCA columns¶
See forge#101553
Description¶
The TYPO3 v13 core strives to auto-create database columns derived from
TCA
columns
definitions without explicitly declaring them in
ext_tables.sql
.
Creating "management" fields like uid
, pid
automatically derived
from TCA
ctrl
settings is available for a couple of core versions
already, the core now extends this to single TCA
columns
.
As a goal, extension developers should not need to maintain a
ext_tables.sql
definition for casual table columns anymore, the file can
vanish from extensions and the core takes care of creating fields with sensible
defaults.
Of course, it is still possible for extension authors to override single
definitions in ext_tables.sql
files in case they feel the core does
not define them in a way the extension author wants: Explicit definition in
ext_tables.sql
always take precedence over auto-magic.
Impact¶
Extension authors should start removing single column definitions from
ext_tables.sql
for extensions being compatible with TYPO3 v13 and up.
If all goes well, the database analyzer will not show any changes since the core
definition is identical to what has been defined in ext_tables.sql
before.
In various cases though, the responsible class DefaultTcaSchema
may come
to different conclusions than the extension author. Those cases should be reviewed
by extension authors one-by-one: Most often, the core declares a more restricted
field, which is often fine. In some cases though, the extension author may
know the particular field definition better than the core default, and may decide
to keep the field definition within ext_tables.sql
.
Columns are auto-created for these TCA
columns
types:
type = 'category'
- core v12 alreadytype = 'datetime'
- core v12 alreadytype = 'slug'
- core v12 alreadytype = 'json'
- core v12 alreadytype = 'uuid'
- core v12 alreadytype = 'file'
- new with core v13type = 'email'
- new with core v13type = 'check'
- new with core v13type = 'folder'
- new with core v13type = 'imageManipulation'
- new with core v13type = 'language'
- new with core v13type = 'group'
- new with core v13type = 'flex'
- new with core v13