| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace addons\DoubleCopy\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250513093951InsertFreezeFundMonthlyLimitedCrontab
- */
- class M250513093951InsertFreezeFundMonthlyLimitedCrontab extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $now = time();
- $sql = <<<SQL
- INSERT INTO `qimall_crontab_task` (`name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('二二复制执行冻结基金每月期限', 'double-copy/frozen-fund/freeze-fund-monthly-limited', 2, '0 0 0 1 * *', 0, 1, $now, $now);
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250513093951InsertFreezeFundMonthlyLimitedCrontab cannot be reverted.\n";
- return false;
- }
- */
- }
|