Review main Merged

63702[BUGFIX] Make SQL schema migrations working on SQLite

Markus Klein CR +2 V +2 Hard +48 −862 updated 03/17/20, 08:14

Commit message

This patch fixes three things:

1) SQLite can handle a primary key, the special handling
   can be removed. The field names must be quoted though.
   A lot of duplicate tests can be removed here.

2) The handcrafted arrays passed on to the TableDiff class
   need to be indexed by the column or index name, otherwise
   the SQLite driver fails to identify them correctly.

3) Allow only one column operation per table.
   Having multiple column adjustments (rename, removal)
   within one run generates wrong migration SQL.
   This is due to the possibility of the Install Tool
   to be able to select on a "per column" level.
   (Keep in mind that in SQLite one operation needs at
   least 5 SQL statements, contrary to other DMBS)

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Daniel Siepmann +1
    • TYPO3com +1 CI

Issues 3

Files 4

Review log 1623

  1. Markus Klein uploaded patch set 1 03/13/20, 10:11

  2. Markus Klein commented on patch set 1 03/13/20, 10:12

  3. Andreas Kienast voted on patch set 1 CR +1 03/13/20, 10:17

  4. TYPO3com voted on patch set 1 V -1 03/13/20, 10:23 Completed build in 11m 21s on Fri, 13 Mar, 10:23 AM Test Summary: 71898 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1317

  5. TYPO3com voted on patch set 1 V +1 03/13/20, 10:32 Completed build in 32m 32s on Fri, 13 Mar, 10:32 AM Test Summary: 72195 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1317

  6. Benni Mack commented on patch set 1 03/13/20, 11:33

    wow. interesting. why didn't the tests show this?
  7. Markus Klein commented on patch set 1 03/13/20, 14:19

    > Patch Set 1: > > wow. interesting. why didn't the tests show this? Good question. Will try to find out.
  8. Markus Klein updated the commit message in patch set 2 03/13/20, 16:48

  9. Markus Klein uploaded patch set 3 03/13/20, 16:59

  10. TYPO3com voted on patch set 2 V +1 03/13/20, 17:00 Completed build in 11m 49s on Fri, 13 Mar, 05:00 PM Test Summary: 72195 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1318

  11. Markus Klein updated the commit message in patch set 4 03/13/20, 17:01

  12. Markus Klein rebased onto patch set 5 03/13/20, 17:03

  13. TYPO3com voted on patch set 3 V +1 03/13/20, 17:10 Completed build in 11m 27s on Fri, 13 Mar, 05:10 PM Test Summary: 72193 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1319

  14. TYPO3com voted on patch set 4 V +1 03/13/20, 17:26 Completed build in 14m 50s on Fri, 13 Mar, 05:26 PM Test Summary: 72195 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1322

  15. TYPO3com voted on patch set 5 V +1 03/13/20, 17:34 Completed build in 23m 19s on Fri, 13 Mar, 05:34 PM Test Summary: 72195 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1324

  16. Markus Klein uploaded patch set 6 03/13/20, 19:13

  17. TYPO3com voted on patch set 6 V +1 03/13/20, 19:24 Completed build in 11m 07s on Fri, 13 Mar, 07:24 PM Test Summary: 71955 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1329

  18. Daniel Siepmann voted on patch set 6 V +1 03/13/20, 19:25

  19. Benni Mack commented on patch set 6 V +1 CR +1 03/16/20, 20:06

    OK. The reason why I did this 1.5 years ago was due to an ugly "change" in Doctrine DBAL with SQLite where AUTO_INCREMENT and primary key had some strange side-effects - as well as the possibility to have multiple fields for the primary key back then, this went south when we upgraded to Doctrine DBAL 2.8. _Maybe_ this will become an issue in TYPO3 v9 as well. I will do a manual backport now to see if this runs through in TYPO3 v9.
  20. Markus Klein commented on patch set 6 03/17/20, 01:12

    > Patch Set 6: Verified+1 Code-Review+1 > > OK. The reason why I did this 1.5 years ago was due to an ugly "change" in Doctrine DBAL with SQLite where AUTO_INCREMENT and primary key had some strange side-effects - as well as the possibility to have multiple fields for the primary key back then, this went south when we upgraded to Doctrine DBAL 2.8. _Maybe_ this will become an issue in TYPO3 v9 as well. I will do a manual backport now to see if this runs through in TYPO3 v9. Yes this has been fixed upstream. Since v9 runs on "doctrine/dbal": "^2.10" as well, I'm pretty confident we are safe there too now.
  21. Georg Ringer voted on patch set 6 V +1 CR +1 03/17/20, 08:12

  22. Benni Mack voted on patch set 6 V +2 CR +2 03/17/20, 08:14

  23. Benni Mack merged patch set 7 03/17/20, 08:14