51928[BUGFIX] SchemaMigrator: Don't add indexes on changed columns
Commit message
Review
-
Code review CR +2
- Morton Jonuschat +2
- Markus Klein +1
-
Verified V +2
- Morton Jonuschat +2
- Johannes Kasberger +1
- TYPO3com +1 CI
Issues 2
Files 4
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php2+15 −0
- typo3/sysext/core/Tests/Functional/Database/Fixtures/addIndexOnChangedColumn.sqlnew+5 −0
- typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php+15 −0
- typo3/sysext/install/Classes/Updates/InitialDatabaseSchemaUpdate.php+22 −3
Review log 2229
Show 34 earlier messages
-
Thomas Hohn uploaded patch set 1 03/02/17, 13:29
-
TYPO3com voted on patch set 1 V -1 03/02/17, 13:36 Completed build in 07m 36s on Thu, 2 Mar, 02:36 PM Test Summary: 1 of 56397 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8839
-
Thomas Hohn commented on patch set 1 03/02/17, 13:45
I still need to look at the test - but please test -
Josef Glatz commented on patch set 1 03/02/17, 14:14
will test it in the evening! Thx Thomas so far!
-
Morton Jonuschat commented on patch set 1 CR -1 03/02/17, 14:53
This seems to be a different take on the change I2c4b17076812fa9602f73cbb5f3418b88e3af41d I am not able to reproduce either error condition, it must be something environment (i.e. DB version) related that needs to be investigated further. My gut feeling is that this approach (performing any and all column changes) is overly broad and there could be a better approach if the source of the problem is known.ConnectionMigrator.php:209Can be reduced to if(!empty($schemaDiff->changedTables[$key]->addedIndexes) || !empty(...)) -
Morton Jonuschat commented on patch set 1 03/02/17, 15:05
I think we need to figure out why under some circumstances this is detected as an ADD that ends up in addedIndexes instead of a CHANGE thats put into changedIndexes. The index should exist (in a slightly different configuration) and as such be properly detected. Having it end up in the ADD section might have the added problem that it would require a DROP first (as it already exists). This approach could trade one problem for the next that the index can not be created due to a name conflict. -
Thomas Hohn commented on patch set 1 03/02/17, 15:54
See the ticket for the newest findings -
Morton Jonuschat commented on patch set 1 03/02/17, 15:58
There's nothing new in the ticket. The first part is the same text as for the other issue and the second one is a different table with the same problem. I don't see anything new there. Thanks to Markus we only confirmed that the database is clean, which makes it even harder to figure out the proper solution because these changes should not be detected as add operations. -
Thomas Hohn commented on patch set 1 03/02/17, 16:07
Now there is :-) -
Thomas Hohn commented on patch set 1 CR -1 03/02/17, 20:03
Morton - I can have a look at what we discussed if you want? -
Thomas Hohn uploaded patch set 2 03/02/17, 21:05
-
Thomas Hohn uploaded patch set 3 03/02/17, 21:08
-
TYPO3com voted on patch set 2 V -1 03/02/17, 21:14 Completed build in 08m 37s on Thu, 2 Mar, 10:14 PM Test Summary: 56397 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8843
-
TYPO3com voted on patch set 3 V +1 03/02/17, 21:17 Completed build in 08m 48s on Thu, 2 Mar, 10:17 PM Test Summary: 56397 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8844
-
Morton Jonuschat commented on patch set 3 CR -1 03/03/17, 03:04
On it -
Morton Jonuschat uploaded patch set 4 03/03/17, 03:24
-
TYPO3com voted on patch set 4 V -1 03/03/17, 03:32 Completed build in 08m 17s on Fri, 3 Mar, 04:32 AM Test Summary: 56398 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8846
-
Morton Jonuschat uploaded patch set 5 03/03/17, 03:34
-
TYPO3com voted on patch set 5 V +1 03/03/17, 03:43 Completed build in 09m 09s on Fri, 3 Mar, 04:43 AM Test Summary: 56398 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8847
-
Thomas Hohn voted on patch set 5 CR +1 V +1 03/03/17, 10:44
-
Markus Klein updated the commit message in patch set 6 03/03/17, 12:10
-
Markus Klein commented on patch set 6 03/03/17, 12:13
ConnectionMigrator.php:210we use !empty() for this for consistency and performance -
TYPO3com voted on patch set 6 V +1 03/03/17, 12:19 Completed build in 08m 43s on Fri, 3 Mar, 01:19 PM Test Summary: 56398 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8856
-
Thomas Hohn uploaded patch set 7 03/03/17, 12:41
-
Markus Klein voted on patch set 7 CR +1 03/03/17, 12:45
-
TYPO3com voted on patch set 7 V +1 03/03/17, 12:48 Completed build in 07m 00s on Fri, 3 Mar, 01:48 PM Test Summary: 56398 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8857
-
Johannes Kasberger commented on patch set 7 V +1 03/03/17, 16:00
I tried the upgrade wizards with the new patch and now I get no errors. Is it possible to extract the for loops from InitialDatabaseSchemaUpdate and ConnectionMigrator to a single location? The loops are the same (except for the unset). -
Morton Jonuschat commented on patch set 7 CR +2 V +2 03/04/17, 01:35
No, not easily since it would be a public interface on ConnectionMigrator then, and that no better than a few lines of code duplication do have different actions as well. -
Gerrit merged patch set 7 03/04/17, 01:35