php - Symfony same code, different server, no field or assocation -
i have 2 servers (on locally , 1 production). have same settings. thing update when want new code go production src folder. folder same when push release.
on local server new column in entity/table works, , can created, updated, etc. on production environment, new column isn't noticed or selected doctrine.
the new column in database (both production , local), in entity.php file, in entity.orm.yml file.
i did app/console cache:clear option. both dev , prod , on both servers.
what doing wrong?
finally found solution.
because didn't use metadata cache on local server, did on production server, saved mapping information. that's why doctrine didn't knew had new columns. solution clear metadata cache using:
php bin/console doctrine:cache:clear-metadata
after run php bin/console doctrine:schema:update --dump-sql , got new columns.
Comments
Post a Comment