| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240627143755AddonsStoreMenuInsert
- */
- class M240627143755AddonsStoreMenuInsert extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $time=time();
- $sql = <<<SQL
- INSERT INTO `qimall_addons_store_menu`(`id`, `title`, `app_id`, `pid`, `addons_name`, `is_addon`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES
- (60, '下载', '0', 0, '', 0, 'store/client/download/index', 'el-icon-download', 2, 0, 999, NULL, '', 1, $time, $time),
- (61, '下载中心', '0', 60, '', 0, 'store/client/download/index', '', 2, 0, 999, NULL, '', 1, $time, $time);
- 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 "M240627143755AddonsStoreMenuInsert cannot be reverted.\n";
- return false;
- }
- */
- }
|