Review main Merged

81532[FEATURE] Auto create DB fields from TCA for type "number"

Anja Leichsenring CR +2 V +2 Hard +335 −64 updated 10/26/23, 12:17

Commit message

Tables with TCA columns set to type="number" 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=number.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 2

Files 22

Show 2 more files

Review log 2635

Show 610 earlier messages
  1. Anja Leichsenring uploaded patch set 1 10/24/23, 04:03

  2. core-ci voted on patch set 1 V -1 10/24/23, 04:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48107

  3. Anja Leichsenring uploaded patch set 2 V -1 10/24/23, 04:41

  4. core-ci voted on patch set 2 V -1 10/24/23, 04:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48109

  5. Anja Leichsenring uploaded patch set 3 V -1 10/24/23, 05:04

  6. core-ci voted on patch set 3 V -1 10/24/23, 05:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48110

  7. Anja Leichsenring uploaded patch set 4 V -1 10/24/23, 05:35

  8. core-ci voted on patch set 4 V -1 10/24/23, 05:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48113

  9. Oliver Klee commented on patch set 4 10/24/23, 11:28

    DefaultTcaSchema.php:970

    To be on the safe side, I propose having a bool and int cast here. (For older TCA in some extensions I've seen, nullable might be `0` or `1` (int or string) instead of `true` and `false`, which might break the comparison a few lines further down.
  10. Anja Leichsenring uploaded patch set 5 V -1 10/24/23, 12:06

  1. Anja Leichsenring commented on patch set 5 10/24/23, 12:09

    DefaultTcaSchema.php:970 Reply

    if so, we need to do that for all the file, I copied that particular snippet. Would therefor say we tackle it in a dedicated patch.
  2. Oliver Klee commented on patch set 5 10/24/23, 12:09

    DefaultTcaSchema.php:970 Reply

    Ack
  3. core-ci voted on patch set 5 V -1 10/24/23, 12:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48124

  4. Garvin Hicking commented on patch set 5 10/24/23, 13:28

    (just to note this here:) SQLite currently chokes on this via PDO; numbers are converted/mapped to (rounded) floats and thus insertion (and later on retrievals in tests) mismatches: 100.00 -> 100 100.0 -> 100 100.10 -> 100.1 100.99 -> 100.99
  5. Anja Leichsenring uploaded patch set 6 V -1 10/25/23, 17:17

  6. core-ci voted on patch set 6 V +1 10/25/23, 17:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48191

  7. Oliver Klee voted on patch set 6 V +1 10/25/23, 17:29

  8. Garvin Hicking commented on patch set 6 CR +1 10/25/23, 19:23

    Reply

    Done
    Looking good; maybe add a "todo" optimization pointer to move the $connection variable outside the inner loops, just when $tableName gets set, so it'll only be performed once per table. (Setting precision and scale via TCA as a follow-up, maybe integrate that in the todo pointer?)
  9. Stefan Bürk commented on patch set 6 CR -1 10/26/23, 07:27

    on it ...
  10. Stefan Bürk uploaded patch set 7 CR +1 V +1 10/26/23, 09:20

  11. Garvin Hicking commented on patch set 7 V +1 CR +1 10/26/23, 09:26

    Nice, seems to work in my test. Thanks for the doc pointers here!
  12. core-ci voted on patch set 7 V -1 10/26/23, 09:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48216

  13. Stefan Bürk uploaded patch set 8 CR +1 V +1 10/26/23, 10:32

  14. core-ci voted on patch set 8 V +1 10/26/23, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48220

  15. Garvin Hicking voted on patch set 8 V +1 CR +1 10/26/23, 10:43

  16. Stefan Bürk voted on patch set 8 V +1 CR +1 10/26/23, 10:50

  17. Christian Kuhn commented on patch set 8 CR -1 10/26/23, 11:09

    on it.
  18. Christian Kuhn uploaded patch set 9 CR +1 V +1 10/26/23, 11:54

  19. Christian Kuhn voted on patch set 9 V +1 CR +1 10/26/23, 11:54

  20. Garvin Hicking voted on patch set 9 V +1 CR +1 10/26/23, 11:55

  21. Stefan Bürk voted on patch set 9 V +1 CR +1 10/26/23, 11:58

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

  23. Nikita Hovratov voted on patch set 9 V +1 CR +1 10/26/23, 12:15

  24. Christian Kuhn voted on patch set 9 V +2 CR +2 10/26/23, 12:17

  25. Christian Kuhn merged patch set 10 10/26/23, 12:17