Skip to content

Commit

Permalink
Added support for allOrNothing config option
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaplet authored and f3l1x committed Apr 12, 2022
1 parent 9f2bc98 commit 20b846b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DI/MigrationsExtension.php
Expand Up @@ -42,6 +42,7 @@ public function getConfigSchema(): Schema
Configuration::VERSIONS_ORGANIZATION_BY_YEAR_AND_MONTH
),
'customTemplate' => Expect::string(),
'allOrNothing' => Expect::bool(false)
]);
}

Expand All @@ -62,7 +63,8 @@ public function loadConfiguration(): void
->setFactory(Configuration::class)
->addSetup('setCustomTemplate', [$config->customTemplate])
->addSetup('setMetadataStorageConfiguration', [$storage])
->addSetup('addMigrationsDirectory', [$config->namespace, $config->directory]);
->addSetup('addMigrationsDirectory', [$config->namespace, $config->directory])
->addSetup('setAllOrNothing', [$config->allOrNothing]);;

if ($config->versionsOrganization === Configuration::VERSIONS_ORGANIZATION_BY_YEAR) {
$configuration->addSetup('setMigrationsAreOrganizedByYear');
Expand Down

0 comments on commit 20b846b

Please sign in to comment.