M230811063449UpdateUsership.php 813 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace app\migrations;
  3. use common\models\user\UserPartitionRelationship;
  4. use yii\db\Migration;
  5. /**
  6. * Class M230811063449UpdateUsership
  7. */
  8. class M230811063449UpdateUsership extends Migration
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function safeUp()
  14. {
  15. try {
  16. UserPartitionRelationship::fixDeep();
  17. }catch (\Exception $e){
  18. }
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. echo "M230811063449UpdateUsership cannot be reverted.\n";
  26. return false;
  27. }
  28. /*
  29. // Use up()/down() to run migration code without a transaction.
  30. public function up()
  31. {
  32. }
  33. public function down()
  34. {
  35. echo "M230811063449UpdateUsership cannot be reverted.\n";
  36. return false;
  37. }
  38. */
  39. }