[BUGFIX] Make SQL schema migrations working on SQLite
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) Resolves: #90758 Resolves: #90754 Resolves: #90751 Releases: master, 9.5 Change-Id: I972346fae3cc97b877e20033b466345fa1c0a83d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63702 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Daniel Siepmann <coding@daniel-siepmann.de> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php 41 additions, 16 deletions...ysext/core/Classes/Database/Schema/ConnectionMigrator.php
- typo3/sysext/core/Classes/Database/Schema/DefaultTcaSchema.php 3 additions, 21 deletions.../sysext/core/Classes/Database/Schema/DefaultTcaSchema.php
- typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaSqliteTest.php 0 additions, 820 deletions...Tests/Unit/Database/Schema/DefaultTcaSchemaSqliteTest.php
- typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaTest.php 4 additions, 5 deletions.../core/Tests/Unit/Database/Schema/DefaultTcaSchemaTest.php
Please register or sign in to comment