tao-test/app/tao/migrations/Version202010042003512234_tao.php

32 lines
798 B
PHP
Raw Normal View History

2022-08-29 20:14:13 +02:00
<?php
declare(strict_types=1);
namespace oat\tao\migrations;
use Doctrine\DBAL\Schema\Schema;
use oat\tao\model\Lists\Business\Service\ClassMetadataService;
use oat\tao\scripts\install\RegisterClassMetadataServices;
use oat\tao\scripts\tools\migrations\AbstractMigration;
final class Version202010042003512234_tao extends AbstractMigration
{
public function getDescription(): string
{
return 'Register services for metadata class discovery endpoint';
}
public function up(Schema $schema): void
{
(new RegisterClassMetadataServices())
->setServiceLocator($this->getServiceManager())
();
}
public function down(Schema $schema): void
{
$this->getServiceManager()->unregister(ClassMetadataService::SERVICE_ID);
}
}