| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace addons\Store\console\migrations;
- use addons\Store\common\models\StoreAdmin;
- use yii\db\Migration;
- /**
- * Class M240723104955InsertAddonsStoreMenu
- */
- class M240723104955InsertAddonsStoreMenu extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $time = time();
- try {
- $sql = <<<SQL
- INSERT INTO `qimall_addons_store_menu`(`title`, `app_id`, `pid`, `addons_name`, `is_addon`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES ('客服设置', '0', 8, '', 0, 'store/client/setting/customer', '', 2, 0, 999, NULL, '', 1, $time, $time);
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- echo $e->getMessage();die();
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240723104955InsertAddonsStoreMenu cannot be reverted.\n";
- return false;
- }
- }
|