cekta/migrator

migration tool

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/cekta/migrator

dev-master 2025-11-06 19:32 UTC

This package is auto-updated.

Last update: 2025-11-06 19:32:42 UTC


README

tool to you migration

Advantages

  1. Migration can be located on any directory
  2. Migration file name not required datetime, we use static method id() should return number (like unixtimestamp). Ordering via number
  3. Migration is just common class with any dependencies

Usage

  1. install

    composer require cekta/migrator
    
  2. Register commands in you cli

    \Cekta\Migrator\Command\Migrate::class,
    \Cekta\Migrator\Command\Rollback::class,
    \Cekta\Migrator\Command\MakeMigration::class
  3. Create new migration via IDE or command make:migration

  4. Register migration and dependency in you psr/container, see full example

Migrate

php ./tests/bin/cli.php migrate -i

Rollback

php ./tests/bin/cli.php migration:rollback

Test for develop

make migrate
make rollback

Requirements

  1. docker
  2. make

Contact