Sephen
Sephen

Reputation: 1111

Propel 2.0 model:build cannot find database

I'm trying to reverse engineer a database with Propel 2. But every time i try to run the model:build command i get the following error:

[Propel\Generator\Exception\InvalidArgumentException]
Invalid database name: no configured connection named 'default'

It says "no configured connection"?? but is was able to generate a schema.xml from the database with the "reverse" command?

Thanks in advance.

Upvotes: 0

Views: 1278

Answers (1)

K.C. Tang
K.C. Tang

Reputation: 139

I found that I am having similar situation.

<database name="somename" ...>

Change the name attribute in <database> in the generated schema.xml to match the connection name in your propel.yaml may solve the problem.

database:
  connections:
      somename:
          adapter: mysql

Upvotes: 5

Related Questions