| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace addons\Mch\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240718063040InsertQimallAddonsMchMenu
- */
- class M240718063040InsertQimallAddonsMchMenu extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- INSERT INTO `qimall_addons_mch_menu`
- (`title`, `app_id`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`)
- VALUES
- ('打印日志', '0', 3, 'mch/client/order/print-log', '', 2, 0, 999, NULL, '', 1, 0, 0);
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- echo "Error inserting record into qimall_addons_mch_menu: " . $e->getMessage() . "\n";
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240718063039InsertQimallAddonsMchMenu cannot be reverted.\n";
- return false;
- }
- }
|