shish il y a 6 ans
Parent
commit
5f4c6e8356
2 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. 5 1
      console/controllers/UpgradeController.php
  2. 1 4
      sql2.txt

+ 5 - 1
console/controllers/UpgradeController.php

@@ -10,8 +10,12 @@ class UpgradeController extends Controller
 
 	public function actionInit()
 	{
-		$sql = "";
+
+		//更新积分 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();
+
 	}
 
 }

+ 1 - 4
sql2.txt

@@ -762,7 +762,4 @@ shish 2019.11.23
 !!jwt的过期时间要设置得短点
 
 shish 2019.11.22
-!!注意要将成积分移到成长值里
-
-shish 2019.11.22
-ALTER TABLE xhUserAsset ADD growth INT NOT NULL DEFAULT 0 COMMENT '成长值' AFTER `point`;
+!!注意要将成积分移到成长值里