M250117070013CreateAddIsAllowChildrenDeductionStockColumnToCloudStockAgentTable.php 743 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace addons\CloudStock\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Handles the creation of table `{{%add_is_allow_children_deduction_stock_column_to_cloud_stock_agent}}`.
  6. */
  7. class M250117070013CreateAddIsAllowChildrenDeductionStockColumnToCloudStockAgentTable extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. ALTER TABLE `qimall_addons_cloud_stock_agent`
  16. ADD COLUMN `is_stock_deducted_by_subordinate` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '自己的库存是否可以给下级补货 0允许 1不允许';
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. return false;
  26. }
  27. }