joseki / migration
Joseki/Migration is console database migration tool for your PHP apps.
v2.0.0
2018-11-04 21:53 UTC
Requires
- php: ~7.0
- dibi/dibi: ~3.0
- doctrine/dbal: 2.4.2
- joseki/console: ~0.1
- joseki/utils: ~1.0
- nette/di: ~2.2
- nette/finder: ~2.2
- nette/php-generator: >=2.3.4
- nette/reflection: ~2.2
- nette/robot-loader: ~2.2
- symfony/config: ~2.7
- symfony/console: ~2.7
- symfony/yaml: ~2.7
- tharos/leanmapper: ~3.0
Requires (Dev)
- joseki/leanmapper-extension: @dev
- mockery/mockery: ~0.9
- nette/bootstrap: ~2.2
- nette/tester: ~1.0
README
Requirements
Joseki/Migration requires PHP 5.4 or higher.
Installation
The best way to install Joseki/Migration is using Composer:
$ composer require joseki/migration
Register compiler extension in your config.neon
:
extensions: Migration: Joseki\Migration\DI\MigrationExtension
Example
Add the following to your config.neon
:
extensions: Migration: Joseki\Migration\DI\MigrationExtension Migration: migrationDir: # specifies location of migrations migrationPrefix: Migration # migration filename prefix migrationTable: _migration_log # database table for migration sync logFile: # OPTIONAL options: # OPTIONAL collate: 'utf8_unicode_ci' # OPTIONAL (DEFAULT VALUE) cascading: true # OPTIONAL (DEFAULT VALUE)
Running a console command
Create a new empty migration
app/console joseki:migration:create
Sync all existing migrations with your database
app/console joseki:migration:migrate
Create a new migration based on existing LeanMapper entities (registered Repositories)
app/console joseki:migration:from-lm