我问了很多问题,但没有一个解决方案对我有效。希望有人能有所了解。
这是我的build.properties文件
propel.project = league
propel.database = mysql
propel.database.url = 'mysql:host=localhost;dbname=leaguerunner'
propel.database.user = root
propel.database.password = root
Propel版本为2.0.0-alpha2,PDO已安装并使用这些参数进行验证,PHP版本为5.4.4。
> propel reverse
Schema reverse engineering failed. You can use the --verbose option to get more information.
>propel reverse --verbose mysql:host=localhost;dbname=leaguerunner mysql:dbname=leaguerunner
Reading database structure...
There was an error building XML from metadata: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
Schema reverse engineering failed.
>propel reverse --verbose mysql:host=localhost;dbname=leaguerunner
Reading database structure...
There was an error building XML from metadata: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
Schema reverse engineering failed.
"推进反向"适用于推进2.0,但build.properties适用于推进1.*.
您应该使用提供Propel 2.0的配置选项之一:http://propelorm.org/documentation/cookbook/working-with-existing-databases.html
在这里你可以看到btw版本的差异列表:
http://propelorm.org/documentation/whats-new.html