Skip to content

akrabat/rka-doctrine-migrations-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Standalone runner for Doctrine Migrations

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.

About

Standalone runner for Doctrine Migrations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages