37 lines
844 B
PHP
37 lines
844 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace oat\tao\migrations;
|
||
|
|
||
|
use Doctrine\DBAL\Schema\Schema;
|
||
|
use Doctrine\Migrations\Exception\IrreversibleMigration;
|
||
|
use oat\tao\scripts\SyncModels;
|
||
|
use oat\tao\scripts\tools\migrations\AbstractMigration;
|
||
|
|
||
|
/**
|
||
|
* Auto-generated Migration: Please modify to your needs!
|
||
|
*/
|
||
|
final class Version202007201424192234_tao extends AbstractMigration
|
||
|
{
|
||
|
|
||
|
public function getDescription(): string
|
||
|
{
|
||
|
return 'Update Ontology models';
|
||
|
}
|
||
|
|
||
|
public function up(Schema $schema): void
|
||
|
{
|
||
|
$this->addReport(
|
||
|
$this->propagate(new SyncModels())([])
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public function down(Schema $schema): void
|
||
|
{
|
||
|
throw new IrreversibleMigration(
|
||
|
'The models should be updated via `SyncModels` script after reverting their RDF definitions.'
|
||
|
);
|
||
|
}
|
||
|
}
|