I have a PG database containing multiple schemas.
I have a symfony2 application which need to connect to only one of them.
If I don't configure anything, by default Doctrine2 searches in all the schemas so it try to make SELECT
on table where it haven't the right.
I followed this answer : symfony2 + doctrine2@postgresql setting a schema
Now it seems to go only in the shema I specified but it is still looking for some tables no present in my schema but in other ones.
When I execute something ldoctrine:migrations:diff
[Doctrine\DBAL\DBALException]
An exception occurred while executing 'SELECT min_value, increment_by FROM "pgstatspacknameid"':
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "pgstatspacknameid" does not exist
LINE 1: SELECT min_value, increment_by FROM "pgstatspacknameid"
^
[PDOException]
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "pgstatspacknameid" does not exist
LINE 1: SELECT min_value, increment_by FROM "pgstatspacknameid"
^
So following the doctrine migration documentation, I added this line in the connection configuration :
schema_filter: ~^(?!pgstats)~
It still always try to make SELECT
in those tables...