| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace addons\LuckyGroup\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220810084004InsertQimallCrontabTask
- */
- class M220810084004InsertQimallCrontabTask extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220810084004InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- //`id`, `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`
- $this->insert('qimall_crontab_task', [
- 'name' => '幸运拼团手动拼团订单过了有效期自动退款',
- 'command' => 'lucky-group/lucky-group-crontab/exp-activity',
- 'type' => 2,
- 'rule' => '0 30 0 * * *',
- 'is_warning' => 0,
- 'status' => 1,
- 'created_at' => 1660120549,
- 'updated_at' => 1660120549,
- ]);
- }
- public function down()
- {
- echo "M220810084004InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- }
|