I have a PG database containing several schemas.
I have a symfony2 application that needs to be connected to only one of them.
If I do not configure anything, by default Doctrine2 searches in all the schemas, so it tries to do SELECT in a table where it has no right.
I followed this answer: symfony2 + doctrine2 @postgresql sets the schema
Now it seems to go only to the shema that I pointed out, but he is still looking for some tables that are not in my schema, but in others.
When I do 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 documentation for the doctrine documentation, I added this line to the connection configuration:
schema_filter: ~^(?!pgstats)~
He still always tries to do SELECT in these tables ...
source share