38322
- 38322 评论了源码 基于yii2的内容管理框架
> create table {{%notify_category}} ... done (time: 0.390s) > insert into {{%notify_category}} ... done (time: 0.047s) *** applied m160622_073825_create_notify (time: 0.889s) *** applying m160702_101410_create_plugins > create table {{%module}} ... done (time: 0.296s) > add primary key id on {{%module}} (id) ... done (time: 0.062s) > insert into {{%module}} ... done (time: 0.000s) > insert into {{%module}} ...Exception 'yii\db\Exception' with message 'SQLS TATE[HY000]: General error: 1364 Field 'bootstrap' doesn't have a default value The SQL being executed was: INSERT INTO `yii2cmf_module` (`id`, `name`, `class`, `status`, `type`, `created_at`, `updated_at`) VALUES ('message', '站内信模块', 'comm on\\modules\\message\\Module', 1, 1, 1472004918, 1472004918)' in D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Schema.php:633 Error Info: Array ( [0] => HY000 [1] => 1364 [2] => Field 'bootstrap' doesn't have a default value ) Stack trace: #0 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Command.php(854): yii\d b\Schema->convertException(Object(PDOException), 'INSERT INTO `yi...') #1 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Migration.php(189): yii \db\Command->execute() #2 D:\myWorkSoft\content\www\demo\database\migrations\m160702_101410_create_plug ins.php(45): yii\db\Migration->insert('{{%module}}', Array) #3 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\console\controllers\BaseMi grateController.php(509): m160702_101410_create_plugins->up() #4 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\console\controllers\BaseMi grateController.php(130): yii\console\controllers\BaseMigrateController->migrate Up('m160702_101410_...') #5 [internal function]: yii\console\controllers\BaseMigrateController->actionUp( 0)
楼主你好,我这边执行 PHP yii app时报错,您知道是什么原因吗
=============================================================================
An Error occurred while handling another error: exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'yii.yii2cmf_config' doesn't exist' in D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Command.php:900 Stack trace: #0 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Command.php(900): PDOStatement->execute() #1 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Command.php(362): yii\db\Command->queryInternal('fetchAll', NULL) #2 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\Query.php(210): yii\db\Command->queryAll() #3 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\db\ActiveQuery.php(133): yii\db\Query->all(NULL) #4 D:\myWorkSoft\content\www\demo\common\components\Config.php(35): yii\db\ActiveQuery->all() #5 D:\myWorkSoft\content\www\demo\frontend\config\main.php(59): common\components\Config->get('SITE_NAME') #6 [internal function]: {closure}(Object(yii\base\Event)) #7 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\base\Component.php(541): call_user_func(Object(Closure), Object(yii\base\Event)) #8 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\base\View.php(486): yii\base\Component->trigger('beginPage') #9 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\views\errorHandler\exception.php(6): yii\base\View->beginPage() #10 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\base\View.php(325): require('D:\\myWorkSoft\\c...') #11 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\base\View.php(247): yii\base\View->renderPhpFile('D:\\myWorkSoft\\c...', Array) #12 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\web\ErrorHandler.php(241): yii\base\View->renderFile('@yii/views/erro...', Array, Object(yii\web\ErrorHandler)) #13 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\web\ErrorHandler.php(112): yii\web\ErrorHandler->renderFile('@yii/views/erro...', Array) #14 D:\myWorkSoft\content\www\demo\vendor\yiisoft\yii2\base\ErrorHandler.php(109): yii\web\ErrorHandler->renderException(Object(yii\db\Exception)) #15 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\db\Exception))
然后执行的时候,就报这种错误了