#103448Move DB index definition from ext_tables.sql to TCA
Description
The TCA file should be extended to setup table indexes.
1. option
'types' => [
...
],
'columns' => [
...
],
'indexes' => [
'language_identifier' => ['l10n_parent','sys_language_uid'],
'mn_key' => ['key_to_other_table'],
...
],
This would leave more room to also include fields set by Typo3 like pid or uid.
or
2. option
'columns' => [
'parent_key' => [
'config' => [
...
'foreign_table' => 'tx_extname_domain_model_parent',
'index' => 'index_name',
],
],
...
],
With the 2. option one would just set the index by the field and if more than one field have the same index name it becomes an index over the all fields.
Maybe having both options could be useful?
As this is just the idea I have not thought about index types like primary, unique, … or order.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[FEATURE] Move DB index definition from ext_tables.sql to TCA Resolves: #103448 Releases: main