| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230109110505InsertIntoQimallLink
- */
-
- class M230109110505InsertIntoQimallLink extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "
- INSERT INTO `qimall_link` (`name`, `title`, `cat_id`, `open_type`, `route`, `remark`, `status`, `created_at`, `updated_at`) VALUES ( '', '全部分类2', 4, 'page', '/plugins3/menu/index', '', 1, 1634096281, 1636011379);
- INSERT INTO `qimall_diy_components` (`code`, `title`, `group`, `icon`, `count`, `is_top`, `permission`, `sort`, `source`, `status`, `created_at`, `updated_at`) VALUES ('img-ad-swiper', '轮播图片', 'img_text', '', 999, 0, '{\"is_drag\":\"true\",\"is_up\":\"true\",\"id_down\":\"true\",\"is_copy\":\"true\"}', 999, '', 1, 1634538238, 1634538238);
- ";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230109110505InsertIntoQimallLink cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M221111063020InsertIntoQimallTown cannot be reverted.\n";
- return false;
- }
- */
- }
|