Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joseki/migration
Database Phinx-like migration runner and generator using Joseki/Console
https://github.com/joseki/migration
Last synced: about 1 month ago
JSON representation
Database Phinx-like migration runner and generator using Joseki/Console
- Host: GitHub
- URL: https://github.com/joseki/migration
- Owner: Joseki
- License: mit
- Created: 2015-08-30T17:57:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-04T21:54:53.000Z (about 6 years ago)
- Last Synced: 2024-11-17T06:09:42.986Z (about 2 months ago)
- Language: PHP
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Joseki/Migration
================[![Build Status](https://travis-ci.org/Joseki/Migration.svg?branch=master)](https://travis-ci.org/Joseki/Migration)
[![Latest Stable Version](https://poser.pugx.org/joseki/migration/v/stable)](https://packagist.org/packages/joseki/migration)Requirements
------------Joseki/Migration requires PHP 5.4 or higher.
- [Nette Framework](https://github.com/nette/nette)
- [Dibi](http://dibiphp.com/)
- [Symfony Console](https://github.com/symfony/Console)Installation
------------The best way to install Joseki/Migration is using [Composer](http://getcomposer.org/):
```sh
$ composer require joseki/migration
```Register compiler extension in your `config.neon`:
```yml
extensions:
Migration: Joseki\Migration\DI\MigrationExtension
```Example
-------Add the following to your `config.neon`:
```yml
extensions:
Migration: Joseki\Migration\DI\MigrationExtensionMigration:
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```sh
app/console joseki:migration:create
```Sync all existing migrations with your database
```sh
app/console joseki:migration:migrate
```Create a new migration based on existing LeanMapper entities (registered Repositories)
```sh
app/console joseki:migration:from-lm
```