[DMIG-2] Creating columns of typ SET fails to set default value Created: 08/Jun/10 Updated: 08/Jun/10 Resolved: 08/Jun/10 |
|
| Status: | Resolved |
| Project: | Doctrine Migrations |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Fredrik | Assignee: | Jonathan H. Wage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Doctrine 1.2.2 |
||
| Description |
|
When writing a migration class for a table I wanted to add a new column of the SET type. I've set the notnull option and a default value, but Doctrine fails to generate the correct SQL. Migration function: MySQL error (contains the generated SQL): After a bit of debugging I've found the problem, Doctrine_Formatter::quote() doesn't know how to handle set. Simply adding 'set' to the switch right below 'enum' will make it work as it should. — lib/Doctrine/Formatter.php |
| Comments |
| Comment by Fredrik [ 08/Jun/10 ] |
|
I hope I put this into the right project, wasn't sure if this belonged in "Doctrine 1" but this project is called "Doctrine Migrations" so here it went. |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
This is actually for the Doctrine 2 Migrations project. The Doctrine 1 migrations were a part of the actual Doctrine 1 library. Everything was all coupled together in Doctrine 1. We only split things up for Doctrine 2. |
| Comment by Fredrik [ 08/Jun/10 ] |
|
Oh, I'm sorry. Should I create a new issue under Doctrine 1 to have it fixed there? |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
No, I already fixed the issue. Just for future reference |