Reputation: 4061
I have load project Symfony2 with PostgreSQL this my project. In my local host this project work not problem. In heroku when I run:
heroku run php app/console doctrine:schema:create
[Doctrine\Common\Persistence\Mapping\MappingException]
File mapping drivers must have a valid directory path, however the given path [/tmp/build_d2abd4d4e9172642941b867e70a389eb/src/App/FirstBundle/Resources/config/doctrine
] seems to be incorrect!
this is my config.yml:
doctrine:
dbal:
default_connection: default
connections:
default:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
and I use yml and xml file Resources/config/doctrine/.. for my Entity
and I repeat in my local host project work and I see table for my entity in phppgadmin.
This example in my local run app/console doctrine:schema:validate
[Mapping] OK - The mapping files are correct.
[Database] OK - The database schema is in sync with the mapping files.
I try find response for my question in google but no result, help please
Upvotes: 0
Views: 327
Reputation: 307
You need to check your parameters.yml placed on heroku (not your local version)
If in this file you see db host - localhost, you are forget configure DB You need visit - Heroku addon stores and choose what type of DB you need. After that you have two ways, first - edit parameters.yml.dist in git (realy bad idea - but fast for you) second - learn incenteev-parameters from composer, how to define parameters in composer. For Russian lang - i found this site
Did all entities is in git repo?
Let me know about results.
Upvotes: 0