CakeDC迁移插件无法初始化schema_mmigrations表


CakeDC Migrations plugin cannot initialize schema_migrations table.

我正在尝试使用https://github.com/CakeDC/migrations我的CakePHP应用程序中的插件。安装后,第一步是运行Console/cake Migrations.migration -p Migrations来初始化schema_mmigrations表。我收到以下错误,告诉我schema_mmigrations不存在。

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。

有其他人遇到这个问题吗?有人知道怎么修吗?

CakeDC迁移插件主要是为MySQL设计的。我不相信在不做一些修改的情况下它能与SQLite一起工作。

错误不是来自迁移插件:

注意错误:中的未定义属性:Sqlite::$Error[C:''development''tds''htdocs''app''Plugin''Migrations''Lib''CakeMigration.php,419行]

AFAIR CakePHP没有SqlLite数据源,所以从哪里获得数据源,修复它并添加错误处理。猜测它丢失了,因为error属性丢失了。