S
S
Strate2012-06-07 23:55:17
PostgreSQL
Strate, 2012-06-07 23:55:17

How to use Postgresql schemas in Doctrine 2?

Good afternoon!
I understand with Doctrine + Postgresql, the question arose: how to make doctrine execute a query CREATE SCHEMA 'My_schema_name', and then correctly use the schema at work?
I tried to set the table name as schema.table_name, but the table is created in the schema publicand has the name schema`.`table.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Sundukov, 2012-06-08
@alekciy

I won’t speak for doctrine, but the request of the schema.table_name format should work correctly. Alternatively, you can change the current default schema before the request via SET SCHEMA 'schema_name'

P
patashnik, 2012-06-08
@patashnik

What version of Doctrine2?

S
Strate, 2012-06-08
@Strate

2.1.7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question