M241230063740AlterQimallAddonsCloudStockPriceDifferenceGiftPackage.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace addons\CloudStock\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M241230063740AlterQimallAddonsCloudStockPriceDifferenceGiftPackage
  6. */
  7. class M241230063740AlterQimallAddonsCloudStockPriceDifferenceGiftPackage extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = "
  15. ALTER table qimall_addons_cloud_stock_price_difference_gift_package add not_get_price_difference tinyint(1) not null DEFAULT 0 COMMENT '开启后若代理商获得推荐奖励,则不会同时得到差价奖 1:开启;0:关闭';
  16. ALTER table qimall_addons_cloud_stock_price_difference_gift_package add not_distribute_payment_for_goods tinyint(1) not null DEFAULT 0 COMMENT '开启后若推荐奖发放到货款者后不再发出 1:开启;0:关闭';
  17. ALTER table qimall_addons_cloud_stock_price_difference_order_detail add is_send_recommend_reward tinyint(1) not null DEFAULT 0 COMMENT '是否发放推荐奖励';
  18. ";
  19. $this->execute($sql);
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function safeDown()
  25. {
  26. echo "M241230063740AlterQimallAddonsCloudStockPriceDifferenceGiftPackage cannot be reverted.\n";
  27. return false;
  28. }
  29. /*
  30. // Use up()/down() to run migration code without a transaction.
  31. public function up()
  32. {
  33. }
  34. public function down()
  35. {
  36. echo "M241230063740AlterQimallAddonsCloudStockPriceDifferenceGiftPackage cannot be reverted.\n";
  37. return false;
  38. }
  39. */
  40. }