Actions
Bug #56271
closedSqlSchemaMigrationService getUpdateSuggestions creates invalid MySql statements
Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2014-02-25
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Consider an extension changes its database definition from
CREATE TABLE tx_foobar_table (
old_uid int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (old_uid)
)
toCREATE TABLE tx_foobar_table (
uid int(11) NOT NULL DEFAULT '0' auto_increment,
PRIMARY KEY (uid)
)
The statements the install tool generates for that are:ALTER TABLE tx_realurl_redirects ADD uid int(11) NOT NULL auto_increment;
ALTER TABLE tx_realurl_redirects DROP PRIMARY KEY;
ALTER TABLE tx_realurl_redirects ADD PRIMARY KEY (uid);
The problem here is that the column definition includes the
auto_increment
where MySQL requires a column with auto_increment to be the Primary Key.
There is already a fix in the source code to circumvent this for newly created primary keys, but not if a primary key is changed.
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27839
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Rejected
This is a very very rare case and there hasn't been progress for a year. Therefore closing this one.
Actions