[DC-768] Renaming a NOT NULL column without a default value fails in MySQL migrations Created: 25/Jun/10 Updated: 28/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | Migrations |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jack Sleight | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
When trying to rename a column that is NOT NULL and has no default value, Doctrine generates this SQL: ALTER TABLE `article` CHANGE `typeid` `listid` INT DEFAULT NULL NOT NULL Which fails. It should be: ALTER TABLE `article` CHANGE `typeid` `listid` INT NOT NULL |
| Comments |
| Comment by Matthew Hughes [ 11/Jan/11 ] |
|
can confirm this behaviour on mysql w/ 1.2.4 |
| Comment by Matthew Hughes [ 28/Jan/11 ] |
|
Attached is a patch that solves the issue. |