dotblue / nextras-migrations-command
Easy setup for nextras/migrations with kdyby/console
Installs: 2 951
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- php: >=5.4
- nextras/migrations: >=2.1.0,<2.4.0
- symfony/console: ~2.4
Suggests
- kdyby/console: Command will be automatically registered into the app
- kdyby/events: Command will trigger events on success and fail
This package is not auto-updated.
Last update: 2024-11-09 15:23:18 UTC
README
Requirements
- PHP 5.4+
- nextras/migrations >= 2.1
- kdyby/console >= 2.0 (optional)
- kdyby/events >= 2.0 (optional)
Installation
- Copy source codes from Github or using Composer:
$ composer require dotblue/nextras-migrations-command@~1.0
- Register as Configurator's extension:
extensions:
migrations: DotBlue\Migrations\MigrationsExtension
- Set configuration to fit your app:
migrations:
extensions:
sql: Nextras\Migrations\Extensions\NetteDbSql
groups:
structures: %appDir%/../sql
- By default, migrations use Nette\Database to connect to DB.
nette:
database:
dsn:
user:
password:
symfony/console
or kdyby/console
?
You can use this extension with plain Symfony Console. But if you use Kdyby Console, command will get registered automatically.
kdyby/events
?
if you use kdyby/events
, you can listen to following events:
nextras.migrations.success
(when migrations finish successfully)nextras.migrations.fail
(when migrations finish with exception)nextras.migrations.complete
(when migrations finish regardless outcome)