quazardous/silex-migration

Doctrine migrations service provider for Silex 2

dev-master / 1.0.x-dev 2018-04-27 09:01 UTC

This package is auto-updated.

Last update: 2024-04-20 10:26:17 UTC


README

Yet another one but for Silex 2 !

Intstallation

Add quazardous/silex-migration to your composer.json and register the service.

$app->register(new Quazardous\Silex\Provider\ConsoleServiceProvider, [
    'db.migrations.path' => '/path/to/migrations',
]);

You can customize the provider with parameters :

  • db.migrations.namespace
  • db.migrations.path
  • db.migrations.table_name
  • db.migrations.name

See tests/console.php for a full working minimum example.

Demo

cd demo
touch demo.db
../vendor/bin/doctrine orm:generate-entities entity/
../vendor/bin/doctrine orm:generate-proxies
php ./console.php migrations:diff
php ./console.php migrations:migrate