DDC-3919: Schema creation problem on PostgreSQL #4793

Closed
opened 2026-01-22 14:49:32 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 29, 2015).

Originally assigned to: @deeky666 on GitHub.

Jira issue originally created by user ruscon:

"doctrine/orm": "2.5.1"

my db already have 2 schemas: public and protected.
I moving a table from the protected schema to the public and:

./bin/console doctrine:schema:update --force
ATTENTION: This operation should not be executed in a production environment.

Creating database schema...

  [Doctrine\ORM\Tools\ToolsException]
  Schema-Tool failed with Error 'An exception occurred while executing 'CREATE SCHEMA public':
  SQLSTATE[42P06]: Duplicate schema: 7 ERROR:  schema "public" already exists' while executing DDL: CREATE SCHEMA public

  [Doctrine\DBAL\Exception\DriverException]
  An exception occurred while executing 'CREATE SCHEMA public':
  SQLSTATE[42P06]: Duplicate schema: 7 ERROR:  schema "public" already exists

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[42P06]: Duplicate schema: 7 ERROR:  schema "public" already exists

  [PDOException]
  SQLSTATE[42P06]: Duplicate schema: 7 ERROR:  schema "public" already exists
Originally created by @doctrinebot on GitHub (Sep 29, 2015). Originally assigned to: @deeky666 on GitHub. Jira issue originally created by user ruscon: "doctrine/orm": "2.5.1" my db already have 2 schemas: public and protected. I moving a table from the protected schema to the public and: ``` java ./bin/console doctrine:schema:update --force ``` ``` java ATTENTION: This operation should not be executed in a production environment. Creating database schema... [Doctrine\ORM\Tools\ToolsException] Schema-Tool failed with Error 'An exception occurred while executing 'CREATE SCHEMA public': SQLSTATE[42P06]: Duplicate schema: 7 ERROR: schema "public" already exists' while executing DDL: CREATE SCHEMA public [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'CREATE SCHEMA public': SQLSTATE[42P06]: Duplicate schema: 7 ERROR: schema "public" already exists [Doctrine\DBAL\Driver\PDOException] SQLSTATE[42P06]: Duplicate schema: 7 ERROR: schema "public" already exists [PDOException] SQLSTATE[42P06]: Duplicate schema: 7 ERROR: schema "public" already exists ```
admin added the Bug label 2026-01-22 14:49:32 +01:00
admin closed this issue 2026-01-22 14:49:32 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 29, 2015):

@doctrinebot commented on GitHub (Sep 29, 2015): - relates to [DDC-3633: Schema creation problem on PostgreSQL](http://www.doctrine-project.org/jira/browse/DDC-3633)
Author
Owner

@doctrinebot commented on GitHub (Sep 29, 2015):

Comment created by ruscon:

this bug not in orm

@doctrinebot commented on GitHub (Sep 29, 2015): Comment created by ruscon: this bug not in orm
Author
Owner

@doctrinebot commented on GitHub (Sep 29, 2015):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 29, 2015): 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#4793