Review main Merged

81488[FEATURE] Auto create DB fields from TCA for type "inline"

Anja Leichsenring CR +2 V +2 Expert +577 −462 updated 10/22/23, 12:11

Commit message

Tables with TCA columns set to type="inline" do not
need an ext_tables.sql entry anymore. The core now
creates this field automatically.

This is one of many patches in this area: The v13 goal
is to obsolete ext_tables.sql in most cases by
creating default "business" fields of TCA tables
automatically.

The patch adds the main magic in class DefaultTcaSchema
and removes own ext_tables.sql definitions having
type=inline.

If the child side definition is set as any of

 * foreign_table_field
 * foreign_field

and TCA of those fields is absent or set to type="passthrough",
also those child relation SQL definition is autogenerated and
can be removed from ext_tables.sql file.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 2

Files 23

Show 3 more files

Review log 2537

Show 812 earlier messages
  1. Anja Leichsenring uploaded patch set 1 10/20/23, 08:58

  2. core-ci voted on patch set 1 V -1 10/20/23, 09:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47959

  3. Anja Leichsenring uploaded patch set 2 V -1 10/20/23, 09:15

  4. core-ci voted on patch set 2 V +1 10/20/23, 09:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47961

  5. Oliver Klee voted on patch set 2 V +1 10/20/23, 09:43

  6. Anja Leichsenring rebased onto patch set 3 V +1 10/20/23, 10:13

  7. core-ci voted on patch set 3 V +1 10/20/23, 10:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47964

  8. Nikita Hovratov uploaded patch set 4 V +1 10/20/23, 11:03

  9. core-ci voted on patch set 4 V +1 10/20/23, 11:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47965

  10. Oliver Klee voted on patch set 4 V +1 10/20/23, 11:30

  11. Oliver Klee commented on patch set 4 10/20/23, 11:47

    Looks very good in general! I love these "automate the SQL" kinds of changes! <3 I've added a comment on a place where we could make the code a bit more explicit.

    DefaultTcaSchema.php:898

    I'd prefer to have explicit comparisons here instead of relying on PHP's implicit conversion to boolean: ```php if (($fieldConfig['config']['MM'] ?? '') !== '' || ($fieldConfig['config']['foreign_field'] ?? '') !== '') { ```
  12. Christian Kuhn commented on patch set 4 10/20/23, 12:52

    DefaultTcaSchema.php:918

    could we extend this patch to auto create child-table foreign_field and foreign_table_field as well, if those have no or only passthrough TCA in the child table?
  1. Anja Leichsenring commented on patch set 4 10/20/23, 13:33

    DefaultTcaSchema.php:918 Reply

    Ack
  2. Anja Leichsenring uploaded patch set 5 V +1 10/21/23, 05:38

  3. core-ci voted on patch set 5 V +1 10/21/23, 05:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47996

  4. Oliver Klee commented on patch set 5 V +1 10/21/23, 07:34

    DefaultTcaSchema.php:898 Reply

    Done
  5. Anja Leichsenring updated the commit message in patch set 6 V +1 10/21/23, 07:39

  6. core-ci voted on patch set 6 V +1 10/21/23, 07:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47997

  7. Anja Leichsenring commented on patch set 6 10/21/23, 08:18

    this is working, but not optimized yet. I want feedback about the process first.
  8. Anja Leichsenring uploaded patch set 7 V +1 10/21/23, 09:36

  9. core-ci voted on patch set 7 V -1 10/21/23, 09:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47998

  10. Anja Leichsenring uploaded patch set 8 V -1 10/21/23, 10:04

  11. core-ci voted on patch set 8 V +1 10/21/23, 10:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47999

  12. Anja Leichsenring commented on patch set 9 V +1 10/21/23, 13:12

    Published edit on patch set 8.
  13. core-ci voted on patch set 9 V +1 10/21/23, 13:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48007

  14. Christian Kuhn uploaded patch set 10 V +1 10/22/23, 09:59

  15. Christian Kuhn commented on patch set 10 CR -1 10/22/23, 10:00

    DefaultTcaSchema.php:967

    that does not make sense to me. let's chat on this.
  16. core-ci voted on patch set 10 V +1 10/22/23, 10:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48026

  17. Christian Kuhn uploaded patch set 11 CR -1 V +1 10/22/23, 10:20

  18. core-ci voted on patch set 11 V +1 10/22/23, 10:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48030

  19. Christian Kuhn uploaded patch set 12 V +1 10/22/23, 10:37

  20. core-ci voted on patch set 12 V +1 10/22/23, 10:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48033

  21. Christian Kuhn voted on patch set 12 V +1 CR +1 10/22/23, 11:35

  22. Oliver Klee voted on patch set 12 V +1 10/22/23, 11:42

  23. Nikita Hovratov voted on patch set 12 V +1 CR +1 10/22/23, 12:11

  24. Christian Kuhn voted on patch set 12 V +2 CR +2 10/22/23, 12:11

  25. Christian Kuhn merged patch set 13 10/22/23, 12:11