Componette

Componette

Joseki

Joseki / Migration v2.0.0

Database Phinx-like migration runner and generator using Joseki/Console

download-cloud-line composer require joseki/migration

Joseki/Migration

Build Status Latest Stable Version

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
  • v2.0.0 PHP 7 upgrade

  • v1.1.0 Released version 1.1

    diff v1.0.8...v1.1.0

  • v1.0.8 Released version 1.0.8

  • v1.0.7 Released version 1.0.7

  • v1.0.6 Released version 1.0.6

  • v1.0.5 Released version 1.0.5

    • added validation for skipped migration
    • improved timestamp behaviour in leanmaper migration
  • v1.0.4 Released version 1.0.4

    • added m:ignore and m:ignored to mark property as ignored for database migrations
    • added possibility to specify DATE, DATETIME and TIMESTAMP using m:type(date|datetime|timestamp)
  • v1.0.3 Released version 1.0.3

  • v1.0.2 Released version 1.0.2

  • v1.0.1 Released version 1.0.1

    • Changed migration status messages
    • Added chema generator output
    • Added path normalizer for a nicer filepath on all platforms
  • v1.0.0 Released version 1.0.0

    • fixed autoincrement and relation tables types resolver in schema generator
    • allows set collate for migration generator
    • many minor fixes
  • v0.1.0 Released version 0.1 released

Componette Componette felix@nette.org