Bug #16509

Ext mng / compare: missing columns with auto_increments

Added by Stefan Kreisberg over 15 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2006-08-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Problem:

I found a plugin where, for some strange reasons, one field was not created upon install of the extension. Nevertheless, the install tool, as well as ext. mng. has no problem of reproducing and displaying the error.

This would ordinary work fine, but with auto_increment values you need to specify the primary key as well in the same SQL stmt.

i.e. my problem was presented as if two sql stmts needed to be fired away:

1.
ALTER TABLE `tx_veguestbook_entries` ADD `uid` INT UNSIGNED NOT NULL AUTO_INCREMENT

2.
ALTER TABLE `tx_veguestbook_entries` PRIMARY KEY

This should of course have been:

ALTER TABLE `tx_veguestbook_entries` ADD `uid` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY

Ofcourse this problem might only relate to extensions which exhibit this particular flaw, but AFAIK MySQL will not accept the SQL stmt. 1) since auto_increment should be pri key!

I'd ofcourse be happy to correct the issue if anyone can point me in the direction of the source to diff

:-)

(issue imported from #M4124)


Files

tt_address.sql (1.31 KB) tt_address.sql Administrator Admin, 2007-03-13 12:00

Related issues

Has duplicate TYPO3 Core - Bug #16510: Ext mng / compare: missing columns with auto_incrementsClosedChris topher2006-08-30

Actions
#1

Updated by Robert Heel over 14 years ago

Have the same problem every now and then. To reproduce, delete the table "tt_address" and create it with the attached file ("tt_address.sql"). The plugin "tt_address" trys to update the database:

ALTER TABLE tt_address ADD uid int(11) unsigned NOT NULL auto_increment;
ALTER TABLE tt_address ADD PRIMARY KEY (uid);

#2

Updated by Alexander Opitz almost 8 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.1.7)?

#3

Updated by Alexander Opitz over 7 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Also available in: Atom PDF