M241014172910DeleteRbacItemForTitleSss.php 664 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M241014172910DeleteRbacItemForTitleSss
  6. */
  7. class M241014172910DeleteRbacItemForTitleSss extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. DELETE FROM qimall_rbac_auth_item WHERE id = 4041 AND title = 'sss';
  16. DELETE FROM qimall_rbac_auth_item WHERE id = 2268 AND title = '回收站';
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. echo "M241014172910DeleteRbacItemForTitleSss cannot be reverted.\n";
  26. return false;
  27. }
  28. }