Skip to content

Commit

Permalink
Merge pull request #443 from asgrim/add-version-column-configuration-…
Browse files Browse the repository at this point in the history
…option

Added ability to configure the version column in MigrationsConfigurationFactory
  • Loading branch information
Gianluca Arbezzano committed Feb 11, 2016
2 parents 0bd8b3b + 28e54fe commit 5eacd02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/module.config.php
Expand Up @@ -169,6 +169,7 @@
'name' => 'Doctrine Database Migrations',
'namespace' => 'DoctrineORMModule\Migrations',
'table' => 'migrations',
'column' => 'version',
),
),

Expand Down
3 changes: 2 additions & 1 deletion docs/migrations.md
Expand Up @@ -9,8 +9,9 @@ return array(
'name' => 'Migrations Name',
'namespace' => 'Migrations Namespace',
'table' => 'migrations_table',
'column' => 'version',
),
),
),
)
```
```
Expand Up @@ -52,6 +52,10 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$configuration->setMigrationsTableName($migrationsConfig['table']);
$configuration->registerMigrationsFromDirectory($migrationsConfig['directory']);

if (method_exists($configuration, 'setMigrationsColumnName')) {
$configuration->setMigrationsColumnName($migrationsConfig['column']);
}

return $configuration;
}

Expand Down

0 comments on commit 5eacd02

Please sign in to comment.