Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. 7147 ОЛдовая миграция на refs
  2. <?php
  3.  
  4. namespace Rgkh\Common\Migrations;
  5.  
  6. use Doctrine\DBAL\Schema\Schema;
  7. use Rgkh\Common\Doctrine\Migration\AbstractDataLevelMigration;
  8. use Rgkh\Common\Main\Entity\Reference;
  9.  
  10. class Version20170329173843_7147_update_refs_table extends AbstractDataLevelMigration
  11. {
  12. /**
  13. * @param Schema $schema
  14. */
  15. public function upIfAllows(Schema $schema)
  16. {
  17. $this->updateReferences();
  18. // /** @var \Rgkh\Common\Main\Repository\ReferenceRepository $refsRepository */
  19. // $refsRepository = $this->getDoctrine()->getRepository(Reference::class);
  20. //
  21. // $catalog = $refsRepository->findOneCatalogByCode(Reference::C___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE);
  22. // $refsRepository->appendItems($catalog, [
  23. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE_ADD, 'name' => 'Добавление'],
  24. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE_UPDATE, 'name' => 'Изменение'],
  25. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE_DELETE, 'name' => 'Удаление'],
  26. // ]);
  27. //
  28. // $catalog = $refsRepository->findOneCatalogByCode(Reference::C___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE);
  29. // $refsRepository->appendItems($catalog, [
  30. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_FILE, 'name' => 'Дело'],
  31. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_CONTROLEVENT, 'name' => 'Контрольное событие'],
  32. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_DECISION, 'name' => 'Решение Комиссии и Фонда ЖКХ'],
  33. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_DECISIONEVENT, 'name' => 'Событие из решения'],
  34. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_PLAN, 'name' => 'План-график'],
  35. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_OFFENSE, 'name' => 'Нарушение'],
  36. // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_REPORT, 'name' => 'Ежемесячный отчет'],
  37. // ]);
  38.  
  39. }
  40.  
  41. /**
  42. * @param Schema $schema
  43. */
  44. public function downIfAllows(Schema $schema)
  45. {
  46.  
  47. }
  48.  
  49. /**
  50. * @return string
  51. */
  52. protected function getMigrationLevel()
  53. {
  54. return parent::DATA_MODIFICATION_LEVEL;
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement