DDC-1172: Schema tool does not drop sequences on table drop for PostgreSql platform #1471

Open
opened 2026-01-22 13:15:25 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (May 26, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user gedrox:

When recreating database using

$schemaTool->createSchema($metaDatas);```

the second line fails with error that the sequence "tbl*id*seq" already exists. It's because the sequence is created without an owner column and schema tool doesn't include "drop sequence" statements in the drop SQL.

I've created a patch which fixes the problem for my environment. Revision numbers in patch is from the local SVN. Doctrine base is 2.0.5.
Originally created by @doctrinebot on GitHub (May 26, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user gedrox: When recreating database using `````` $schemaTool->dropSchema($metaDatas); $schemaTool->createSchema($metaDatas);``` the second line fails with error that the sequence "tbl*id*seq" already exists. It's because the sequence is created without an owner column and schema tool doesn't include "drop sequence" statements in the drop SQL. I've created a patch which fixes the problem for my environment. Revision numbers in patch is from the local SVN. Doctrine base is 2.0.5. ``````
admin added the Bug label 2026-01-22 13:15:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1471