M250314082009InsertQimallCrontabTask.php 815 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M250314082009InsertQimallCrontabTask
  6. */
  7. class M250314082009InsertQimallCrontabTask extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. try {
  15. $sql = "
  16. INSERT `qimall_crontab_task` ( `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('聚水潭-重新推送失败的订单', 'js-tan-erp/index/push-order', 2, '0 */30 * * * *', 0, 1, 1739932378, 1739945579);
  17. ";
  18. $this->execute($sql);
  19. } catch (\Exception $e) {
  20. }
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function safeDown()
  26. {
  27. echo "M250314082009InsertQimallCrontabTask cannot be reverted.\n";
  28. return false;
  29. }
  30. }