| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- *
- * Class M220915100927InsertQimallCrontab
- */
- class M220915100927InsertQimallCrontab 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 ( '修改订单表流失单号', 'fix/out-order', 2, '0 */30 * * * *', 0, 1, 1663236777, 1663236777)";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220915100927InsertQimallCrontab cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220915100927InsertQimallCrontab cannot be reverted.\n";
- return false;
- }
- */
- }
|