akrabat/rka-doctrine-migrations-runner

Standalone runner for Doctrine Migrations

1.0.3 2015-05-24 10:40 UTC

This package is auto-updated.

Last update: 2021-04-06 01:43:58 UTC


README

This project provides vendor/bin/migrations.php which allows running docrine/migrations1 without any framework integration.

Installation

$ composer require doctrine/migrations:dev-master
$ composer require akrabat/rka-doctrine-migrations-runner

(We need to explictly require doctrine/migrations as that project hasn't yet published a stable version)

Usage

  1. Create a migrations folder

  2. Create a migrations.yml file containing:

     name: Doctrine Migrations
     migrations_namespace: Migrations
     table_name: migrations
     migrations_directory: migrations
    
  3. Create a migrations-db.php file containing your database connection details:

     <?php
     return array(
         'dbname'   => 'database',
         'user'     => 'username',
         'password' => 'mypassword',
         'host'     => 'localhost',
         'driver'   => 'pdo_mysql',
     );
     ?>
    
  4. Test:

    php vendor/bin/migrations.php status
    

See the documentation2 for the rest.