| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250325073346InsertQimallCrontabTask
- */
- class M250325073346InsertQimallCrontabTask extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "INSERT INTO `qimall_crontab_task`(`name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('每日数据备份', 'backups-data/index', 2, '0 0 1 * * *', 0, 0, 1731381176, 1731978930);";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250325073346InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250325073346InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- */
- }
|