Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-931

SchemaTool->dropSchema fails if the given schema doesn't exist

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-RC2
    • Fix Version/s: 2.0.1, 2.1
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      SchemaTool->dropSchema's documentation says:

       
      Drops the database schema for the given classes.
      
      In any way when an exception is thrown it is supressed since drop was issued for all classes of the schema and some probably just don't exist.
      

      However, with a recent upgrade to 2.0-RC2, this doesn't work anymore. A PDO exception isn't caught if the specified table doesn't exist already.

       
      exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'UserAddress'' in /usr/share/php/Doctrine/DBAL/Connection.php:577
      

      I'm not sure if this was caused by the ORM update or if it's maybe somewhere inside DBAL, which I upgraded at the same time.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Timo A. Hummel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: