| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Exception;
- use yii\db\Migration;
- /**
- * Class M220906062142InsertQimallAddonsStoreMenu
- */
- class M220906062142InsertQimallAddonsStoreMenu extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $this->execute("INSERT INTO `qimall_addons_store_menu`(`id`, `title`, `app_id`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES (31, '赊账', '0', 0, 'store/client/credit/index', '', 3, 0, 999, NULL, '', 1, 0, 0);");
- $this->execute("INSERT INTO `qimall_addons_store_menu`(`id`, `title`, `app_id`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES (32, '赊账记录', '0', 31, 'store/client/credit/index', '', 3, 0, 999, NULL, '', 1, 0, 0);");
- $this->execute("INSERT INTO `qimall_addons_store_menu`(`id`, `title`, `app_id`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES (33, '赊账设置', '0', 31, 'store/client/credit/setting-credit', '', 3, 0, 999, NULL, '', 1, 0, 0);");
- }catch (Exception $e){
- var_dump($e->getMessage());
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220906062142InsertQimallAddonsStoreMenu cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220906062142InsertQimallAddonsStoreMenu cannot be reverted.\n";
- return false;
- }
- */
- }
|