M230331014723AlipayMiniJoinGroupChatLink.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M230331014723AlipayMiniJoinGroupChatLink
  6. */
  7. class M230331014723AlipayMiniJoinGroupChatLink extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->execute("INSERT INTO `qimall_link_category` ( `name`, `title`, `pid`, `is_list`, `remark`, `status`, `created_at`, `updated_at`) VALUES ( 'alipay_chat_link', '支付宝群', 9, 0, '此功能仅限于支付宝小程序跳转到支付宝群聊', 1, 1630564778, 1636017644);");
  15. $this->execute("INSERT INTO `qimall_link` (`name`, `title`, `cat_id`, `open_type`, `route`, `remark`, `status`, `created_at`, `updated_at`) VALUES ('mp_ali_app_chat', '支付宝群链接', 45, 'alipay_page', '', '', 1, 1634096281, 1636017216);");
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function safeDown()
  21. {
  22. echo "M230331014723AlipayMiniJoinGroupChatLink cannot be reverted.\n";
  23. return false;
  24. }
  25. /*
  26. // Use up()/down() to run migration code without a transaction.
  27. public function up()
  28. {
  29. }
  30. public function down()
  31. {
  32. echo "M230331014723AlipayMiniJoinGroupChatLink cannot be reverted.\n";
  33. return false;
  34. }
  35. */
  36. }