我正在尝试在我的 CakePHP 应用程序中使用https://github.com/CakeDC/migrations插件。安装后,第一步是运行Console/cake Migrations.migration -p Migrations
初始化 schema_migrations 表。我收到以下错误,告诉我 schema_migrations 不存在。
Cake Migration Shell
---------------------------------------------------------------
Notice Error: Undefined property: Sqlite::$error in [C:\development\tds\htdocs\app\Plugin\Migrations\Lib\CakeMigration.p
hp, line 419]
Error: Table schema_migrations for model SchemaMigration was not found in datasource default.
#0 C:\development\tds\htdocs\lib\Cake\Model\Model.php(3180): Model->setSource('schema_migratio...')
#1 C:\development\tds\htdocs\lib\Cake\Model\Model.php(2631): Model->getDataSource()
#2 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(158): Model->find('all', Array)
#3 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(105): MigrationVersion->getMapping('Migratio
ns')
#4 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(290): MigrationVersion->setVersion(1, 'Migra
tions', false)
#5 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(307): MigrationVersion->run(Array)
#6 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(277): MigrationVersion->resetMigration('Migr
ations')
#7 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(346): MigrationVersion->run(Array)
#8 C:\development\tds\htdocs\app\Plugin\Migrations\Lib\MigrationVersion.php(68): MigrationVersion->__initMigrations()
#9 C:\development\tds\htdocs\app\Plugin\Migrations\Console\Command\MigrationShell.php(84): MigrationVersion->__construct
(Array)
#10 C:\development\tds\htdocs\lib\Cake\Console\Shell.php(382): MigrationShell->startup()
#11 C:\development\tds\htdocs\lib\Cake\Console\ShellDispatcher.php(201): Shell->runCommand('-p', Array)
#12 C:\development\tds\htdocs\lib\Cake\Console\ShellDispatcher.php(69): ShellDispatcher->dispatch()
#13 C:\development\tds\htdocs\app\Console\cake.php(33): ShellDispatcher::run(Array)
#14 {main}
我正在使用带有 SQLite 的 CakePHP 2.2。
有没有其他人遇到过这个问题?谁知道怎么修它?