Project

General

Profile

Actions

Bug #50450

closed

Drop keys before fields in install tool

Added by Alexander Stehlik almost 11 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

Also available in: Atom PDF