quazardous / silex-migration
Doctrine migrations service provider for Silex 2
dev-master / 1.0.x-dev
2018-04-27 09:01 UTC
Requires
- dflydev/doctrine-orm-service-provider: ^2.0@dev
- doctrine/migrations: ^1.0@dev
- quazardous/silex-console: *@dev
- silex/silex: ^2.0@dev
This package is auto-updated.
Last update: 2024-11-20 11:40:45 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