[DC-1037] Migration does not quote identifiers when checking migration version Created: 07/Sep/11 Updated: 07/Sep/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | Migrations |
| Affects Version/s: | 1.2.3, 1.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | John Kary | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux version 2.4.21-63.ELsmp (mockbuild@x86-005.build.bos.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)) #1 SMP Wed Oct 28 23:15:46 EDT 2009, Symfony 1.4.14-DEV, Oracle 11g |
||
| Description |
|
I happen to be using Symfony 1.4.14-DEV (r33007) and am trying to setup migrations with Oracle, which is using Doctrine_Core::ATTR_QUOTE_IDENTIFIER. This issue is in core Doctrine. To reproduce: 1. Make a change to your schema.yml ORA-00942: table or view does not exist : SELECT version FROM migration_version. Failing Query: "SELECT version FROM migration_version"
Cause: The current connection is using quoted identifiers, so the query used to create the migration_version table when migrations are first instantiated was properly created as "migration_version" (notice quotes). But the raw SQL query used in Doctrine_Migration::getCurrentVersion() is not quoting the table or column identifiers, so Oracle can't find the table. There are several places in Doctrine_Migration where the table and column identifiers are not quoted, thus breaking migrations when using a database with strict rules on the case of identifiers. Even though I'm developing against Oracle, this also likely affects other drivers. |
| Comments |
| Comment by John Kary [ 07/Sep/11 ] |
|
Pull request open which quotes all identifiers in Doctrine_Migration and fixes this issue: |