kskaradzinski
kskaradzinski

Reputation: 5084

Propel migration with multiple connections defined

Is there any chance I can migrate only one database, if I have define multiple connections in my config.yml If I run propel:migration:diff --connection=a it still want to generate migration for all databases defined. My vendors

propel/propel-bundle 1.2.7 Integration of Propel in Symfony2

propel/propel1 1.6.9 Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

Upvotes: 0

Views: 380

Answers (1)

Alexander Guz
Alexander Guz

Reputation: 1364

Yes, you can. Although I have Propel 1.7.1 I don't think this has changed since 1.6.9. You have to create a separate buildtime-conf.xml file for each connection and then pass the path to this file while calling propel-gen diff. So, let's say you have a-buildtime-conf.xml:

propel-gen . diff -Dpropel.buildtime.conf.file=a-buildtime-conf.xml

I found this by debugging the GeneratorConfig::getBuildConnections() method.

Upvotes: 1

Related Questions