| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace addons\ScoreExpansion\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250703064952InsertRecommendRewardCrontab
- */
- class M250703064952InsertRecommendRewardCrontab extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $now = time();
- $sql = <<<SQL
- INSERT INTO `qimall_crontab_task` (`name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('积分拓客:每日发放推荐奖励', 'score-expansion/score-expansion/recommend-reward-order', 2, '0 0 0 * * *', 0, 0, $now, $now);
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250703064952InsertRecommendRewardCrontab cannot be reverted.\n";
- return false;
- }
- */
- }
|