reddogs-at / reddogs-doctrine-migrations
This package is abandoned and no longer maintained.
The author suggests using the reddogs-at/reddogs-migrations package instead.
Module specific doctrine migrations
1.0.0
2016-10-25 05:50 UTC
Requires
- php: ^5.5 || ^7.0
- doctrine/migrations: ^1.4
- zendframework/zend-servicemanager: ^3.1
- zfcampus/zf-console: ^1.3
Requires (Dev)
- container-interop/container-interop: ^1.1
- doctrine/common: ^2.6
- doctrine/orm: ^2.5
- phpunit/phpunit: ^5.5
- reddogs-at/reddogs-test: ^0.1.0
This package is not auto-updated.
Last update: 2019-02-20 19:04:44 UTC
README
Module specific doctrine migrations
Installation
composer require reddogs-at/reddogs-doctrine-migrations
Configuration
I recommend Building Modular Applications with Zend Expressive
Create a file ModuleConfig.php
in your module source path. (e.g. module/YourModule/src
) or add config
key reddogs_doctrine_migrations
to existing configuration:
<?php namespace YourModule; class ModuleConfig { public function __invoke() { return [ 'doctrine' => [ 'reddogs_doctrine_migrations' => [ 'your_module' => [ 'namespace' => 'YourModule', 'directory' => dirname(__DIR__) . '/data/migrations', 'table_name' => 'your_module_migrations' ] ] ] ]; } }
Configuration Options
(see section Custom Configuration of Doctrine Migrations documentation)
namespace
: your module namespacedirectory
: path to migration classestable_name
: name of the module migration table
Usage
Execute single module migration up or down
- Simple:
/path/to/script.php mogrations:execute <moduleName> [--version=]
- All paramenters:
/path/to/script.php mogrations:execute <moduleName> [--version=] [--write-sql] [--dry-run] [--up] [--down] [--query-time] [--quiet|-q] [--no-interaction|-n] [--verbose|-v|-vv|-vvv]
Generate new blank module migration class
- Simple:
/path/to/script.php mogrations:generate <moduleName>
- All parameters:
mogrations:generate <moduleName> [--quiet|-q] [--no-interaction|-n] [--verbose|-v|-vv|-vvv]
Output the latest module migration version number
- All parameters:
/path/to/script.php mogrations:latest <moduleName>
Execute a module migration to a specified version or the latest available version
- Simple:
/path/to/script.php mogrations:migrate <moduleName>
- All parameters:
mogrations:migrate <moduleName> [--version=] [--dry-run] [--write-sql] [--query-time] [--quiet|-q] [--no-interaction|-n] [--verbose|-v|-vv|-vvv]
Migrate all registered module migrations
- All parameters:
mogrations:migrate-all
View the status of a set of module migrations
- All Parameters:
mogrations:status <moduleName>