Skip to content

Commit

Permalink
chore: add migration to sync models
Browse files Browse the repository at this point in the history
  • Loading branch information
shpran committed Nov 20, 2024
1 parent f814dff commit fe69dc7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
30 changes: 30 additions & 0 deletions migrations/Version202411200904142234_tao.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

namespace oat\tao\migrations;

use Doctrine\DBAL\Schema\Schema;
use oat\tao\scripts\tools\migrations\AbstractMigration;
use oat\tao\scripts\update\OntologyUpdater;

/**
* phpcs:disable Squiz.Classes.ValidClassName
*/
final class Version202411200904142234_tao extends AbstractMigration
{
public function getDescription(): string
{
return 'Sync models';
}

public function up(Schema $schema): void
{
OntologyUpdater::syncModels();
}

public function down(Schema $schema): void
{
OntologyUpdater::syncModels();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public function isSatisfiedBy(core_kernel_classes_Class $class): bool
$isEditableProperty = $this->ontology->getProperty(GenerisRdf::PROPERTY_IS_EDITABLE);
$isEditable = $class->getOnePropertyValue($isEditableProperty);

if (empty($isEditable)) {
return true;
}

return $isEditable->getUri() !== GenerisRdf::GENERIS_FALSE;
return empty($isEditable) || $isEditable->getUri() !== GenerisRdf::GENERIS_FALSE;
}
}

0 comments on commit fe69dc7

Please sign in to comment.