shish 4 år sedan
förälder
incheckning
7337059cfe
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 0
      console/controllers/InitController.php
  2. 0 1
      sql.sql

+ 2 - 0
console/controllers/InitController.php

@@ -61,6 +61,8 @@ class InitController extends Controller
     {
         $sql = "ALTER TABLE xhGhsItemClass ADD shopId INT NOT NULL DEFAULT 0 COMMENT '门店id' AFTER sjId;";
         Yii::$app->db->createCommand($sql)->execute();
+        $sql = "ALTER TABLE xhAdminRole ADD shopId INT NOT NULL DEFAULT 0 COMMENT '门店id' AFTER `sjId`;";
+        Yii::$app->db->createCommand($sql)->execute();
 
         $list = SjClass::getAllByCondition(['id>' => 0], null, '*', null, true);
         if (!empty($list)) {

+ 0 - 1
sql.sql

@@ -972,6 +972,5 @@ ALTER TABLE xhAdmin MODIFY `miniOpenId` VARCHAR(100) COLLATE utf8mb4_unicode_ci
 
 ALTER TABLE `xhAdmin` MODIFY `currentShopId` INT(11) NOT NULL DEFAULT '0' COMMENT '零售当前管理的门店' AFTER `super`;
 ALTER TABLE `xhAdmin` MODIFY `openShop` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '零售申请开店 1没有 2有申请,待审核 3有申请,已审核通过' AFTER `currentShopId`;
-ALTER TABLE xhAdminRole ADD shopId INT NOT NULL DEFAULT 0 COMMENT '门店id' AFTER `sjId`;
 
 -- ssh 20220424