perform a views regenerating

This commit is contained in:
Daniel Seifert 2022-12-19 10:59:38 +01:00
parent 5faa4ddb13
commit 54a2a721cb
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
2 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@ use Doctrine\DBAL\Driver\Exception as DoctrineDriverException;
use Doctrine\DBAL\Exception as DoctrineException;
use Doctrine\DBAL\Query\QueryBuilder;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\DbMetaDataHandler;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\DatabaseException;
@ -48,6 +49,17 @@ class Actions
}
}
/**
* Regenerate views for changed tables
*/
public function regenerateViews()
{
$oDbMetaDataHandler = oxNew(DbMetaDataHandler::class);
$oDbMetaDataHandler->updateViews();
}
/**
* @return bool
* @throws ContainerExceptionInterface

View File

@ -38,6 +38,7 @@ class Events
/** @var Actions $actions */
$actions = oxNew(Actions::class);
$actions->setupDatabase();
$actions->regenerateViews();
}
public static function onDeactivate()