1

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 schemas 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

2
  • Hi, what version of symfony are you using? Commented Dec 1, 2009 at 16:53
  • v1.0 - I have added it to the post Commented Dec 1, 2009 at 20:11

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Nice! Thanks a lot. I will try to remember to publish my created .bat file on my blog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.