Actions
Bug #105438
openSetting a foreign key on an TCA-autogenerated SQL column crashes the DB compare tool
Status:
New
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2024-10-24
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
When having an inline field or a select field to another table, it can be useful to declare foreign keys on the relation field (for reeferential integrity, generating SQL relation diagrams or doing ON DELETE
/ON UPDATE
stuff directly via SQL). When letting the TCA autogenerate the SQL definition it is not possible to declare a foreign key. The DB compare tool will just crash hard. One has to copy the field definition to ext_tables.sql
then.
# When letting this field be created by TCA automagic (same SQL defintion) it will crash:
my_field int unsigned DEFAULT NULL,
FOREIGN KEY fk_my_field (my_field) REFERENCES foreign_table (uid)
Note: this bug only affects foreign keys! Normal indexes work just fine on TCA-autogenerated fields!
No data to display
Actions