| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230424072525AlterTableQimallCrontabTask
- */
- class M230424072525AlterTableQimallCrontabTask 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 ( '数据统计-rf-rm分析', 'census-mall/index', 2, '0 5 0 * * *', 0, 1, 1652338022, 1652338022);";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230424072525AlterTableQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230424072525AlterTableQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- */
- }
|