PostgreSQL inconsistent multiple schema creation #6258

Open
opened 2026-01-22 15:29:42 +01:00 by admin · 2 comments
Owner

Originally created by @bednic on GitHub (Jun 24, 2019).

Bug Report

Q A
BC Break no
Version 2.6.3

Summary

orm:schema-tool:create inconsistent multiple schema creation behavior

Current behavior

Prerequisites: I'm using PostgreSQL and have two schemas, e.g. A and B and clean DB.

Case 1: If non of schemas exist, then doctrine create A but throw error, that B schema doesn't exist.

Case 2: When manually create A and B, then doctrine throw error, that schema A exist

Only possible solution is to create B schema manually and then run create command which create missing schema A and then whole model.

How to reproduce

  1. Create clean DB, need to be PostgreSQL
  2. Create Entity with some schema
  3. Create Entity with different schema
  4. Call CLI command orm:schema-tool:create

Expected behavior

I expect that doctrine create all schemas by self, XOR me create all schemas manually and then create database model.

P.S. I found some similar issues, but they solve issue with migrating between schemas, or re-creating/updating shemas, but not this particular case, when I want create whole new database. So maybe it is related to some other projects like DBAL.

Originally created by @bednic on GitHub (Jun 24, 2019). ### Bug Report | Q | A |------------ | ------ | BC Break | no | Version | 2.6.3 #### Summary orm:schema-tool:create inconsistent multiple schema creation behavior #### Current behavior Prerequisites: I'm using PostgreSQL and have two schemas, e.g. A and B and clean DB. Case 1: If non of schemas exist, then doctrine create A but throw error, that B schema doesn't exist. Case 2: When manually create A and B, then doctrine throw error, that schema A exist Only possible solution is to create B schema manually and then run create command which create missing schema A and then whole model. #### How to reproduce 1. Create clean DB, need to be PostgreSQL 2. Create Entity with some schema 3. Create Entity with different schema 4. Call CLI command orm:schema-tool:create #### Expected behavior I expect that doctrine create all schemas by self, XOR me create all schemas manually and then create database model. P.S. I found some similar issues, but they solve issue with migrating between schemas, or re-creating/updating shemas, but not this particular case, when I want create whole new database. So maybe it is related to some other projects like DBAL.
Author
Owner

@Ocramius commented on GitHub (Jun 24, 2019):

What about orm:schema-tool:update?

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On Mon, Jun 24, 2019 at 1:39 PM Tomas Benedikt notifications@github.com
wrote:

Bug Report
Q A
BC Break no
Version 2.6.3 Summary

orm:schema-tool:create inconsistent multiple schema creation behavior
Current behavior

Prerequisites: I'm using PostgreSQL and have two schemas, e.g. A and B and
clean DB.

Case 1: If non of schemas exist, then doctrine create A but throw error,
that B schema doesn't exist.

Case 2: When manually create A and B, then doctrine throw error, that
schema A exist

Only possible solution is to create B schema manually and then run create
command which create missing schema A and then whole model.
How to reproduce

  1. Create clean DB, need to be PostgreSQL
  2. Create Entity with some schema
  3. Create Entity with different schema
  4. Call CLI command orm:schema-tool:create

Expected behavior

I expect that doctrine create all schemas by self, XOR me create all
schemas manually and then create database model.

P.S. I found some similar issues, but they solve issue with migrating
between schemas, or re-creating/updating shemas, but not this particular
case, when I want create whole new database. So maybe it is related to some
other projects like DBAL.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/doctrine/orm/issues/7754?email_source=notifications&email_token=AABFVEBSAE2MC57ZHDICWWLP4CXALA5CNFSM4H25XUI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G3IURHA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABFVEBVYVAVX5NVR4PEWD3P4CXALANCNFSM4H25XUIQ
.

@Ocramius commented on GitHub (Jun 24, 2019): What about `orm:schema-tool:update`? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Jun 24, 2019 at 1:39 PM Tomas Benedikt <notifications@github.com> wrote: > Bug Report > Q A > BC Break no > Version 2.6.3 Summary > > orm:schema-tool:create inconsistent multiple schema creation behavior > Current behavior > > Prerequisites: I'm using PostgreSQL and have two schemas, e.g. A and B and > clean DB. > > Case 1: If non of schemas exist, then doctrine create A but throw error, > that B schema doesn't exist. > > Case 2: When manually create A and B, then doctrine throw error, that > schema A exist > > Only possible solution is to create B schema manually and then run create > command which create missing schema A and then whole model. > How to reproduce > > 1. Create clean DB, need to be PostgreSQL > 2. Create Entity with some schema > 3. Create Entity with different schema > 4. Call CLI command orm:schema-tool:create > > Expected behavior > > I expect that doctrine create all schemas by self, XOR me create all > schemas manually and then create database model. > > P.S. I found some similar issues, but they solve issue with migrating > between schemas, or re-creating/updating shemas, but not this particular > case, when I want create whole new database. So maybe it is related to some > other projects like DBAL. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/doctrine/orm/issues/7754?email_source=notifications&email_token=AABFVEBSAE2MC57ZHDICWWLP4CXALA5CNFSM4H25XUI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G3IURHA>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AABFVEBVYVAVX5NVR4PEWD3P4CXALANCNFSM4H25XUIQ> > . >
Author
Owner

@bednic commented on GitHub (Jun 24, 2019):

Same issue, schema A was created, but schema B missing and doctrine throw SLQSTATE exception, that schema B doesn't exist.

@bednic commented on GitHub (Jun 24, 2019): Same issue, schema A was created, but schema B missing and doctrine throw SLQSTATE exception, that schema B doesn't exist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6258