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

37 lines
844 B
PHP
Raw Permalink 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 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 Version202107211535182167_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.'
);
}
}