Name spaces not supported when creating a Schema instance from a given set of metadata classes #6411

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

Originally created by @abdel-geniusespro on GitHub (Feb 24, 2020).

Bug Report

Q A
BC Break no
Version 2.7.1

Summary

Current behavior

Name spaces not supported during schema creation.

How to reproduce

  1. Create an entity with @Table(schema="mySchema", name="myTable")
  2. Launch the command doctrine:schema:update --force
  3. you'll have an SQL error the schema mySchema doesn't exists
  4. To understand exactly what happen, lunch the command doctrine:schema:update --dump-sql, you'll see that an SQL instruction is missing create schema mySchema;

Expected behavior

Support name spaces during schema creation.

Originally created by @abdel-geniusespro on GitHub (Feb 24, 2020). ### Bug Report <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | BC Break | no | Version | 2.7.1 #### Summary <!-- Provide a summary describing the problem you are experiencing. --> #### Current behavior Name spaces not supported during schema creation. <!-- What is the current (buggy) behavior? --> #### How to reproduce 1. Create an entity with `@Table(schema="mySchema", name="myTable")` 2. Launch the command `doctrine:schema:update --force` 3. you'll have an SQL error `the schema mySchema doesn't exists` 4. To understand exactly what happen, lunch the command `doctrine:schema:update --dump-sql`, you'll see that an SQL instruction is missing `create schema mySchema;` <!-- Provide steps to reproduce the bug. If possible, also add a code snippet with relevant configuration, entity mappings, DQL etc. Adding a failing Unit or Functional Test would help us a lot - you can submit one in a Pull Request separately, referencing this bug report. --> #### Expected behavior Support name spaces during schema creation. <!-- What was the expected (correct) behavior? -->
admin closed this issue 2026-01-22 15:32:47 +01:00
Author
Owner

@beberlei commented on GitHub (Feb 25, 2020):

That would be a bigger change in DBAL schema abstraction. Similar to MySQL where you need to create the database, you need to create all schema you want to use outside of Doctrine DBAL/ORM schema usage.

It is unlikely that we are going to be changing this as the complexity is too large for the gain.

@beberlei commented on GitHub (Feb 25, 2020): That would be a bigger change in DBAL schema abstraction. Similar to MySQL where you need to create the database, you need to create all schema you want to use outside of Doctrine DBAL/ORM schema usage. It is unlikely that we are going to be changing this as the complexity is too large for the gain.
Author
Owner

@beberlei commented on GitHub (Feb 25, 2020):

@abdel-geniusespro ok, i didn't see that we do have namespace support in DBAL now, when i last worked with the code it didn't exist. So maybe we can add it in SchemaTool.

@beberlei commented on GitHub (Feb 25, 2020): @abdel-geniusespro ok, i didn't see that we do have namespace support in DBAL now, when i last worked with the code it didn't exist. So maybe we can add it in SchemaTool.
Author
Owner

@abdel-geniusespro commented on GitHub (Feb 28, 2020):

Hello @beberlei , thanks for your reply, I solved the problem locally like this https://github.com/doctrine/orm/pull/8046

@abdel-geniusespro commented on GitHub (Feb 28, 2020): Hello @beberlei , thanks for your reply, I solved the problem locally like this https://github.com/doctrine/orm/pull/8046
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6411