Project

General

Profile

Actions

Bug #50450

closed

Drop keys before fields in install tool

Added by Alexander Stehlik over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2013-07-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #49162: Rewrite install toolClosed2011-10-30

Actions
Actions #1

Updated by Gerrit Code Review over 10 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

Actions #2

Updated by Christian Kuhn over 10 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 ...

Actions #3

Updated by Alexander Stehlik over 10 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.

Actions #4

Updated by Gerrit Code Review about 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

Actions #5

Updated by Gerrit Code Review about 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

Actions #6

Updated by Gerrit Code Review almost 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

Actions #7

Updated by Gerrit Code Review over 9 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

Actions #8

Updated by Gerrit Code Review over 9 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

Actions #9

Updated by Gerrit Code Review over 9 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

Actions #10

Updated by Gerrit Code Review over 9 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

Actions #11

Updated by Gerrit Code Review over 9 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

Actions #12

Updated by Alexander Stehlik over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF