Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akrabat/rka-doctrine-migrations-runner

Standalone runner for Doctrine Migrations
https://github.com/akrabat/rka-doctrine-migrations-runner

Last synced: 3 months ago
JSON representation

Standalone runner for Doctrine Migrations

Awesome Lists containing this project

README

        

# Standalone runner for Doctrine Migrations

This project provides `vendor/bin/migrations.php` which allows running
docrine/migrations[1] without any framework integration.

[1]: http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/introduction.html

## 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:

'database',
'user' => 'username',
'password' => 'mypassword',
'host' => 'localhost',
'driver' => 'pdo_mysql',
);
?>

4. Test:

php vendor/bin/migrations.php status

See the documentation[2] for the rest.

[2]: http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/migration_classes.html