| 123456789101112131415161718192021 |
- <?php
- namespace console\controllers;
- use Yii;
- use yii\console\Controller;
- class UpgradeController extends Controller
- {
- public function actionInit()
- {
- //更新积分 shish 2019.11.22
- $sql = "ALTER TABLE xhUserAsset ADD growth INT NOT NULL DEFAULT 0 COMMENT '成长值' AFTER `point`;";
- $sql .= "UPDATE `xhUserAsset` SET `growth`=`integral`;";
- Yii::$app->db->createCommand($sql)->execute();
- }
- }
|