| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230227023408AddTaskToCrontabTask
- */
- class M230227023408AddTaskToCrontabTask extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "INSERT INTO `qimall_crontab_task` ( `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at` ) VALUES ( '修复会员订单统计数据', 'auto-test/fix-order-unread', '2', '0 15 0 * * *', '0', '1', '1677465502', '1677465502' );";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230227023408AddTaskToCrontabTask cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230227023408AddTaskToCrontabTask cannot be reverted.\n";
- return false;
- }
- */
- }
|