这是错误,我已经得到了。让我知道它的根本原因。
SQLSTATE [42000]:语法错误或访问冲突:1701无法截断外键约束中引用的表(
Proficiency
。t_catalog_item_recommendations
,CONSTRAINTfk_t_catalog_item_recommendations_catalog_item_id
FOREIGN KEY({{1参考文献catalog_item_id
。Proficiency
(t_catalog_items
))
每当我执行我的测试脚本时,它都会给出这样的信息:
警告:" catalog_items"失败" SQLSTATE [42S01]:基表或视图已存在:1050表&t; t_catalog_items'已存在"在第244行的/var/www/html/lib/Cake/TestSuite/Fixture/CakeTestFixture.php中调用堆栈:0.0018 262208 1. {main}()/var/www/html/app/webroot/test.php:0 0.1119 1133560 2. CakeTestSuiteDispatcher :: run()/var/www/html/app/webroot/test.php:97 0.1120 1133968 3. CakeTestSuiteDispatcher-> dispatch()/ var / www / html / lib / Cake / TestSuite / CakeTestSuiteDispatcher.php:113 0.1205 1278304 4. CakeTestSuiteDispatcher-> _runTestCase()/var/www/html/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php:96 0.1314 1320376 5. CakeTestSuiteCommand-> run()/ var / www / html / lib / Cake / TestSuite / CakeTestSuiteDispatcher.php:253 0.1930 2144664 6. CakeTestRunner-> doRun()/var/www/html/lib/Cake/TestSuite/CakeTestSuiteCommand.php:96 0.2285 2481368 7. PHPUnit_TextUI_TestRunner-> doRun()/var/www/html/lib/Cake/TestSuite/CakeTestRunner.php:60 0.2334 2521736 8. PHPUnit_Framework_TestSuite-> run()/ var / www / html / vendor / phpunit / phpunit / PHPUnit / TextUI / TestRunner .php:350 0.2538 2770160 9. PHPUnit_Framework_TestSuite-> runTest ()/var/www/html/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:749 0.2538 2770288 10. CakeTestCase-> run()/ var / www / html / vendor / phpunit / phpunit / PHPUnit / Framework / TestSuite.php:779 0.2538 2770512 11. CakeFixtureManager-> load()/var/www/html/lib/Cake/TestSuite/CakeTestCase.php:80 0.2541 2772984 12. CakeFixtureManager-> _setupTable()/ var / www / html / lib / Cake / TestSuite / Fixture / CakeFixtureManager.php:234 0.2572 2784752 13. CakeTestFixture-> create()/ var / www / html / lib / Cake / TestSuite / Fixed / CakeFixtureManager.php:206 0.4597 2824904 14. trigger_error()/var/www/html/lib/Cake/TestSuite/Fixture/CakeTestFixture.php:244