2.0 #33

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+7 −1
Split
@@ -25,7 +25,13 @@
{
public static function configureMigrations(ContainerInterface $container, Configuration $configuration)
{
- $dir = $container->getParameter('doctrine_migrations.dir_name');
+ // Attempt to grab the migrations directory from a configuration file first. If not defined,
+ // use the one from the primary configuration file or the default one.
+ $dir = $configuration->getMigrationsDirectory();
+ if (empty($dir)) {
+ $dir = $container->getParameter('doctrine_migrations.dir_name');
+ }
+
if (!file_exists($dir)) {
mkdir($dir, 0777, true);
}