shlink/config/cli-config.php

28 lines
793 B
PHP
Raw Normal View History

2016-04-17 13:27:24 -05:00
<?php
2019-10-05 10:26:10 -05:00
2017-10-12 03:13:20 -05:00
declare(strict_types=1);
use Doctrine\Migrations\Configuration\EntityManager\ExistingEntityManager;
use Doctrine\Migrations\Configuration\Migration\ConfigurationArray;
use Doctrine\Migrations\DependencyFactory;
2023-07-01 09:33:52 -05:00
// This file is currently used by doctrine migrations only
2016-04-17 13:27:24 -05:00
return (static function () {
$migrationsConfig = [
'migrations_paths' => [
2024-01-02 10:55:23 -06:00
'ShlinkMigrations' => 'module/Core/migrations',
],
'table_storage' => [
'table_name' => 'migrations',
],
'custom_template' => 'data/migrations_template.txt',
];
$em = include __DIR__ . '/entity-manager.php';
return DependencyFactory::fromEntityManager(
new ConfigurationArray($migrationsConfig),
new ExistingEntityManager($em),
);
2019-10-05 10:26:10 -05:00
})();