M230906100755FixDesc.php 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\migrations;
  3. use common\enums\RabbitMqEnum;
  4. use common\models\common\CapitalLog;
  5. use yii\db\Migration;
  6. /**
  7. * Class M230906100755FixDesc
  8. */
  9. class M230906100755FixDesc extends Migration
  10. {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function safeUp()
  15. {
  16. try {
  17. \Yii::$app->services->rabbitMq->push(RabbitMqEnum::EXCHANGE_TASK_IMPORT_USER, RabbitMqEnum::IMPORT_USER, ['id'=>11], CapitalLog::class, 'FDesc');
  18. }catch (\Exception $e){
  19. var_dump($e->getMessage());
  20. }
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function safeDown()
  26. {
  27. echo "M230906100755FixDesc cannot be reverted.\n";
  28. return false;
  29. }
  30. /*
  31. // Use up()/down() to run migration code without a transaction.
  32. public function up()
  33. {
  34. }
  35. public function down()
  36. {
  37. echo "M230906100755FixDesc cannot be reverted.\n";
  38. return false;
  39. }
  40. */
  41. }