| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\ScoreBonus\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240722022156InsertQimallCrontabTask
- */
- class M240722022156InsertQimallCrontabTask extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="INSERT INTO `qimall_crontab_task` ( `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('积分分红每日结算', 'score-bonus/score-bonus-settle/day-settle', 2, '0 5 0 * * *', 0, 1, 1721615131, 1721615131);";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240722022156InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240722022156InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- */
- }
|