Feature: #85160 - Auto create management DB fields from TCA ctrl
See forge#85160
Description
The database schema analyzer automatically creates TYPO3 "management" related
database columns by reading a tables
TCA and checking the
ctrl
section for table capabilities.
Note this affects only basic columns like
uid,
deleted and language
handling related fields like
sys_, but not a tables main
business fields like a "title" field for a news extension. Those still have to
be defined by extension authors. No column definitions are created from the
columns section of a tables
TCA.
However, ext_ file can be stripped down to business fields.
For example, if a
TCA definition of a table specifies
$GLOBALS,
the core will automatically add the column
sorting with an appropriate
definition.
Field definitions in ext_ take precedence over automatically
generated fields, so the core never overrides a manually specified column definition
from an ext_ file.
These columns below are automatically added if not defined in ext_
for database tables that provide a
$GLOBALS definition:
uidandPRIMARY KEY- If removing the uid field from ext_tables.sql, the
PRIMARY KEYmust be removed, too. pidandKEY parent- Column pid is
unsignedif the table is not workspace aware, the default indexparentincludespidandhiddenas well asdeletedif the latter two are specified inTCActrl. The parent index creation is only applied if columnpidis auto generated, too. ['ctrl']['tstamp'] = 'field Name' - Often set to
tstamporupdatedon ['ctrl']['crdate'] = 'field Name' - Often set to
crdateorcreatedon ['ctrl']['cruser_ id'] = 'field Name' - Often set to
cruserorcreatedby ['ctrl']['delete'] = 'field Name' - Often set to
deleted ['ctrl']['enablecolumns'] ['disabled'] = 'field Name' - Often set to
hiddenordisabled ['ctrl']['enablecolumns'] ['starttime'] = 'field Name' - Often set to
starttime ['ctrl']['enablecolumns'] ['endtime'] = 'field Name' - Often set to
endtime ['ctrl']['enablecolumns'] ['fe_ group'] = 'field Name' - Often set to
fe_group ['ctrl']['sortby'] = 'field Name' - Often set to
sorting ['ctrl']['description Column'] = 'field Name' - Often set to
description ['ctrl']['editlock'] = 'field Name' - Often set to
editlock ['ctrl']['language Field'] = 'field Name' - Often set to
sys_language_ uid ['ctrl']['trans Orig Pointer Field'] = 'field Name' - Often set to
l10n_parent ['ctrl']['translation Source'] = 'field Name' - Often set to
l10n_source l10n_state - Column added if
languageandField transare setOrig Pointer Field ['ctrl']['orig Uid'] = 'field Name' - Often set to
t3_origuid ['ctrl']['trans Orig Diff Source Field'] = 'field Name' - Often set to
l10n_diffsource ['ctrl']-['versioning WS'] = true t3ver_*columns- Columns that make a table workspace aware. All those fields are prefixed with
t3ver_, for examplet3ver_andoid t3ver_. A default index namedid t3ver_to fieldsoid t3ver_andoid t3ver_is added, too.wsid
Impact
Extension developers can skip tons of "general" fields from extensions
ext_ files.