DDC-931: SchemaTool->dropSchema fails if the given schema doesn't exist #1159

Closed
opened 2026-01-22 13:04:06 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 13, 2010).

Jira issue originally created by user felicitus:

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.

Originally created by @doctrinebot on GitHub (Dec 13, 2010). Jira issue originally created by user felicitus: 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.
admin added the Bug label 2026-01-22 13:04:06 +01:00
admin closed this issue 2026-01-22 13:04:06 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 22, 2010):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Dec 22, 2010): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Dec 22, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Dec 22, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1159