| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220906062158InsertQimallCrontabTask
- */
- class M220906062158InsertQimallCrontabTask extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $this->execute("INSERT INTO `qimall_crontab_task`( `name`, `command`, `type`, `rule`, `is_warning`, `status`, `created_at`, `updated_at`) VALUES ('自动更新门店优惠券状态', 'store/coupon/update-coupon-status', 2, '0 */1 * * * *', 0, 1, 1660125107, 1660125107);");
- }catch (\Exception $e){
- var_dump($e->getMessage());
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220906062158InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220906062158InsertQimallCrontabTask cannot be reverted.\n";
- return false;
- }
- */
- }
|