M221214071210AlterQimallOrder.php 857 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. *
  6. * Class M221214071210AlterQimallOrder
  7. */
  8. class M221214071210AlterQimallOrder extends Migration
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function safeUp()
  14. {
  15. $sql = "ALTER TABLE `qimall_order` ADD COLUMN `reduce_shipping_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '满邮减免' AFTER `shipping_money`;";
  16. $this->execute($sql);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function safeDown()
  22. {
  23. echo "M221214071210AlterQimallOrder cannot be reverted.\n";
  24. return false;
  25. }
  26. /*
  27. // Use up()/down() to run migration code without a transaction.
  28. public function up()
  29. {
  30. }
  31. public function down()
  32. {
  33. echo "M221214071210AlterQimallOrder cannot be reverted.\n";
  34. return false;
  35. }
  36. */
  37. }