| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace addons\Bargain\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240326104109AddCloseActiveCrontab
- */
- class M240326104109AddCloseActiveCrontab extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql="INSERT INTO `qimall_crontab_task` (`name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('砍价关闭活动检查', 'bargain/bargain/close-active', 2, '0 */1 * * * *', 0, 1, 1702697681, 1702697681);";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240326104109AddCloseActiveCrontab cannot be reverted.\n";
- return false;
- }
- }
|