| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250219061448InsertQimallCrontabTask
- */
- class M250219061448InsertQimallCrontabTask extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql ="
- INSERT `qimall_crontab_task` ( `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('清除小时交易额缓存', 'census/clear-single-hour', 2, '0 0 */1 * * *', 0, 1, 1739932378, 1739945579);
- INSERT INTO `qimall_crontab_task` (`name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ( '清除单日数据缓存', 'census/clear-single-date', 2, '0 10 0 * * *', 0, 1, 1739932422, 1739945636);
- ";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250219061448InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250219061448InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- */
- }
|