Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 7147 ОЛдовая миграция на refs
- <?php
- namespace Rgkh\Common\Migrations;
- use Doctrine\DBAL\Schema\Schema;
- use Rgkh\Common\Doctrine\Migration\AbstractDataLevelMigration;
- use Rgkh\Common\Main\Entity\Reference;
- class Version20170329173843_7147_update_refs_table extends AbstractDataLevelMigration
- {
- /**
- * @param Schema $schema
- */
- public function upIfAllows(Schema $schema)
- {
- $this->updateReferences();
- // /** @var \Rgkh\Common\Main\Repository\ReferenceRepository $refsRepository */
- // $refsRepository = $this->getDoctrine()->getRepository(Reference::class);
- //
- // $catalog = $refsRepository->findOneCatalogByCode(Reference::C___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE);
- // $refsRepository->appendItems($catalog, [
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE_ADD, 'name' => 'Добавление'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE_UPDATE, 'name' => 'Изменение'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_TYPE_QUALITY_CONTROL_HOUSE_DELETE, 'name' => 'Удаление'],
- // ]);
- //
- // $catalog = $refsRepository->findOneCatalogByCode(Reference::C___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE);
- // $refsRepository->appendItems($catalog, [
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_FILE, 'name' => 'Дело'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_CONTROLEVENT, 'name' => 'Контрольное событие'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_DECISION, 'name' => 'Решение Комиссии и Фонда ЖКХ'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_DECISIONEVENT, 'name' => 'Событие из решения'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_PLAN, 'name' => 'План-график'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_OFFENSE, 'name' => 'Нарушение'],
- // ['code' => Reference::I___CHILD_JOURNAL_CHANGE_OBJECT_QUALITY_CONTROL_HOUSE_REPORT, 'name' => 'Ежемесячный отчет'],
- // ]);
- }
- /**
- * @param Schema $schema
- */
- public function downIfAllows(Schema $schema)
- {
- }
- /**
- * @return string
- */
- protected function getMigrationLevel()
- {
- return parent::DATA_MODIFICATION_LEVEL;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement