'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=g-p-y-a-a-c',
'username' => 'g-p-y-a-a-c',
'password' => 'H9xQ0wnWTDEAbRk9',
'tablePrefix' => 'ac_',
'charset' => 'utf8mb4',
'enableSchemaCache' => false,
'schemaCacheDuration' => 3600,
'schemaCache' => 'redisCache',
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=g-p-y-a-a-c',
'username' => 'g-p-y-a-a-c',
'password' => 'H9xQ0wnWTDEAbRk9',
'tablePrefix' => 'ac_',
'charset' => 'utf8mb4',
'enableSchemaCache' => true,
'schemaCacheDuration' => 3600,
'schemaCache' => 'redisCache',
],



PS E:\wwwroot\gitlab-php-yii2-app-advanced-cmc> ./yii cache/flush-schema db
Flush cache schema for "db" connection? (yes|no) [no]:yes
Schema cache for component "db", was flushed.


a:2:{i:0;s:21:"0.25243100 1577424191";i:1;N;}
a:2:{i:0;s:21:"0.84367400 1577424375";i:1;N;}

if [[ $PCS_API_CFG_MIGRATE == "true" ]]
then
php /mcloud/www/pcs-api/yii migrate --migrationPath=@yii/log/migrations/ --interactive=0
php /mcloud/www/pcs-api/yii migrate --interactive=0
php /mcloud/www/pcs-api/yii cache/flush-schema db --interactive=0
elif [[ $PCS_API_CFG_MIGRATE == "false" ]]
then
echo "running without db migrate"
else
echo "please set environment variable PCS_API_CFG_MIGRATE true or false"
fi

2019/12/27 下午3:24:28PCS_API_CFG_ENV=prod
2019/12/27 下午3:24:28Yii Application Initialization Tool v1.0
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28 Start initialization ...
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28 generate console/config/main-local.php
2019/12/27 下午3:24:28 generate console/config/params-local.php
2019/12/27 下午3:24:28 generate common/config/main-local.php
2019/12/27 下午3:24:28 generate common/config/params-local.php
2019/12/27 下午3:24:28 generate yii
2019/12/27 下午3:24:28 generate api/web/index.php
2019/12/27 下午3:24:28 generate api/web/robots.txt
2019/12/27 下午3:24:28 generate api/config/main-local.php
2019/12/27 下午3:24:28 generate api/config/params-local.php
2019/12/27 下午3:24:28 generate frontend/web/index.php
2019/12/27 下午3:24:28 generate frontend/web/robots.txt
2019/12/27 下午3:24:28 generate frontend/config/main-local.php
2019/12/27 下午3:24:28 generate frontend/config/params-local.php
2019/12/27 下午3:24:28 generate rpc/web/index.php
2019/12/27 下午3:24:28 generate rpc/web/robots.txt
2019/12/27 下午3:24:28 generate rpc/config/main-local.php
2019/12/27 下午3:24:28 generate rpc/config/params-local.php
2019/12/27 下午3:24:28 generate backend/web/index.php
2019/12/27 下午3:24:28 generate backend/web/robots.txt
2019/12/27 下午3:24:28 generate backend/config/main-local.php
2019/12/27 下午3:24:28 generate backend/config/params-local.php
2019/12/27 下午3:24:28 generate cookie validation key in backend/config/main-local.php
2019/12/27 下午3:24:28 generate cookie validation key in frontend/config/main-local.php
2019/12/27 下午3:24:28 generate cookie validation key in api/config/main-local.php
2019/12/27 下午3:24:28 chmod 0777 backend/runtime
2019/12/27 下午3:24:28 chmod 0777 backend/web/assets
2019/12/27 下午3:24:28 chmod 0777 frontend/runtime
2019/12/27 下午3:24:28 chmod 0777 frontend/web/assets
2019/12/27 下午3:24:28 chmod 0777 api/runtime
2019/12/27 下午3:24:28 chmod 0777 api/web/assets
2019/12/27 下午3:24:28 chmod 0755 yii
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28 ... initialization completed.
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28PCS_API_CFG_MIGRATE=true
2019/12/27 下午3:24:28Yii Migration Tool (based on Yii v2.0.15.1)
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28No new migrations found. Your system is up-to-date.
2019/12/27 下午3:24:28Yii Migration Tool (based on Yii v2.0.15.1)
2019/12/27 下午3:24:28
2019/12/27 下午3:24:28No new migrations found. Your system is up-to-date.
2019/12/27 下午3:24:29Schema cache for component "db", was flushed.



PHP / Laravel / Yii2 老项目维护与长期技术支持
如果你的 PHP / Laravel / Yii2 项目已经上线,但遇到原开发离职、Bug 长期无人修复、接口不稳定、性能下降、代码难以接手等问题,可以联系我做一次远程技术排查。
适合以下情况:
✅ 老旧 PHP 系统无人维护
✅ Laravel / Yii2 项目 Bug 修复
✅ 后台管理系统小功能迭代
✅ RESTful API 接口排查
✅ MySQL / Redis / Nginx 性能问题
✅ 长期远程兼职维护
可先从一次小问题开始:
✅ 线上报错排查
✅ 接口异常分析
✅ 慢查询与性能瓶颈定位
✅ 代码结构初步评估
✅ 部署环境与日志检查
如需咨询,请联系我,并注明:PHP 维护咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复