| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- use common\models\common\CrontabTask;
- /**
- * Class M241012244504AgentMigrate
- */
- class M241012244504AgentMigrate extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $res = CrontabTask::findOne(['command'=>'agent/agent/delay']);
- if(empty($res)){
- $sql="INSERT INTO `qimall_crontab_task`( `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('渠道分红延时结算', 'agent/agent/delay', 2, '0 */30 * * * *', 0, 1, 1735013591, 1735013591);";
- $this->execute($sql);
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|