tao-test/app/taoLti/migrations/Version202008131228163772_taoLti.php

33 lines
836 B
PHP
Raw Normal View History

2022-08-29 20:14:13 +02:00
<?php
declare(strict_types=1);
namespace oat\taoLti\migrations;
use Doctrine\DBAL\Schema\Schema;
use oat\tao\scripts\tools\migrations\AbstractMigration;
use oat\taoLti\models\classes\Platform\Service\CachedKeyChainGenerator;
use oat\taoLti\models\classes\Platform\Service\KeyChainGeneratorInterface;
final class Version202008131228163772_taoLti extends AbstractMigration
{
public function getDescription(): string
{
return 'Will generate keyChain and store in persistence';
}
public function up(Schema $schema): void
{
$this->getKeyChainGenerator()->generate();
}
public function down(Schema $schema): void
{
}
private function getKeyChainGenerator(): KeyChainGeneratorInterface
{
return $this->getServiceLocator()->get(CachedKeyChainGenerator::class);
}
}