In my project I have 2 databases. propel-build-model is already set up to work for 2 databases - Multiple databases support in Symfony
If I make changes to either of the databases, I need the propel-build-schema command to rebuild the sc开发者_开发技巧hemas for both.
I know I can do this manually by amending my settings per schema, but is it possible to create both at the same time? If so, how can I adjust my propel.ini file to have both connections?
I am currently using Symfony 1.0
The propel-build-schema
command uses the settings in the propel.ini file which can store the configuration of a single connection only. However, you can probably do what you want by creating a copy of your propel.ini file with a different name to store the settings of your other connection and writing a simple shell script to rename the .ini files to propel.ini as needed and invoke propel-build-schema
twice so that each invocation uses the right propel.ini (your script may also need to rename the output schema.yml files as well). Should be simple to do. Then, whenever you want the schema files regenerated, just run the script.
精彩评论