New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MySQL when adding primary key #363
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DBAL-586 We use Jira to track the state of pull requests and the versions they got |
foreach ($diff->changedIndexes as $changedKey => $changedIndex) { | ||
if ($changedIndex->isPrimary() && $changedKey != 'PRIMARY') { | ||
$index = $diff->changedIndexes[$changedKey]; | ||
$index = new index($changedKey, $index->getColumns(), $index->isUnique(), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new Index
(with a capital I).
Please also provide a test case for this issue. |
This is at least needed when adding a autoincrement column
…d index isn't named PRIMARY
@bartv2 Can you elaborate on the problem here, why it appears for you and what your fix does? |
there are 2 problems:
|
Merged into master and 2.4 |
Hmm would have liked to see a functional test for this... |
Um. Unless I'm missing something, half of this change was reverted immediately after it was committed, in a confusingly-named commit: Why was that? I think it's the reason OwnCloud still has problems with DBAL 2.4.2, though I thought all the OC patches or equivalents had now been merged. |
Looks like a backport problem to 2.4 branch... |
OwnCloud does still appear to need this change vs. DBAL 2.4.2. Upgrades from OC 5.0.14a to 6.0.0a (with mariadb as the database) fail with a clean 2.4.2, succeed with a 2.4.2 with this patch re-applied. |
No description provided.