Bug #50450
closedDrop keys before fields in install tool
100%
Description
When a key and the field that is referenced in the key will be removed at the same time in the install tool a database error will occur:
Error: Can't DROP '<key_name>'; check that column/key exists
This is because the install tool will first remove the field and then tries to remove the key which obviously will not work because the referenced field was already deleted.
The solution would be to drop the key before the field.
Steps to reproduce:
- install phpunit extension
- update database in install tool
- uninstall phpunit extension
- in the install tool rename a phpunit dummy field, e.g.
ALTER TABLE be_groups CHANGE tx_phpunit_is_dummy_record zzz_deleted_tx_phpunit_is_dummy_record tinyint(1) unsigned NOT NULL default '0';
- now select the key and the field to be really dropped
ALTER TABLE be_groups DROP zzz_deleted_tx_phpunit_is_dummy_record; ALTER TABLE be_groups DROP KEY phpunit_dummy;
- You will see an error message
Error: Can't DROP 'phpunit_dummy'; check that column/key exists
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22581
Updated by Christian Kuhn about 11 years ago
yeah. Problem: the database schema migrator class is hell, it should be rewritten anyway. atm i do not feel comfortable hacking something like a solution for the concrete problem into the current code ...
Updated by Alexander Stehlik almost 11 years ago
Is it realistic that a rewrite of the SqlSchemaMigrationService is done for 6.2?
If not, a bugfix is better than nothing. And it is not really that "hacky" or complicated. Just changing the order of the database operations.
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22581
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22581
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22581
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22581
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22581
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22581
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22581
Updated by Gerrit Code Review almost 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34101
Updated by Alexander Stehlik almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1e2fbf9487db73fbcc9510dddee30909e65f13fc.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed