I have created views on my db and the corresponding Entity. All seems to work fine but whenever I run
php bin/console doctrine:schema:validate
it will tell me that the mapping is fine, but not the db, as follows:
[Database] FAIL - The database schema is not in sync with the current mapping file.
Looking it up I found that one can configure DBAL to filter out tables from validation.
This is what I attempted on config.yml ( check last line on code below). The intention is to exclude tables whose name start with "view" from validation.
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_mysql
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
schema_filter: ~^(?!view_)~
So, the schema_filter as per this documentation should filter that out, but it doesn't.
I checked a few other questions, including this
Any ideas? Thanks