M240326162713AddVarMap.php 880 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240326162713AddVarMap
  6. */
  7. class M240326162713AddVarMap extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. INSERT INTO `qimall_global_var_map` (`name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ('giving_coupon_reward', '转赠优惠券奖励', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
  16. INSERT INTO `qimall_global_var_map` (`name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ('Store', 'o2o门店', 'FromTypeMap', 1, 1, 1654569888, 1654569888);
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. echo "M240326162713AddVarMap cannot be reverted.\n";
  26. return false;
  27. }
  28. }