Doctrine 1
  1. Doctrine 1
  2. DC-1037

Migration does not quote identifiers when checking migration version


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Migrations
    • Labels:
    • Environment:
      Linux version 2.4.21-63.ELsmp ( (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


      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
      2. Create the migrations diff by executing php symfony doctrine:generate-migrations-diff
      3. New file have been created at ./lib/migration/doctrine/*_version1.php
      4. Try to migrate using command php symfony doctrine:migrate
      5. Results in error:

      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.


        John Kary created issue -
        John Kary added a comment -

        Pull request open which quotes all identifiers in Doctrine_Migration and fixes this issue:

        John Kary added a comment - Pull request open which quotes all identifiers in Doctrine_Migration and fixes this issue:
        Guilherme Blanco made changes -
        Field Original Value New Value
        Affects Version/s 1.2.4 [ 10063 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to failed: Error in remote call to 'FishEye 0 (' ( [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DC-1037, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            Jonathan H. Wage
            John Kary
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: