2017 © Pedro Peláez
 

library doctrine-migrations-boilerplate

Doctrine ORM & Doctrine Migrations project w/ configuration and wiring. Going through the documentation for either project and putting them together can be a pain the first few times. This project provides the end result as sometimes a working example is better documentation.

image

jeremygiberson/doctrine-migrations-boilerplate

Doctrine ORM & Doctrine Migrations project w/ configuration and wiring. Going through the documentation for either project and putting them together can be a pain the first few times. This project provides the end result as sometimes a working example is better documentation.

  • Thursday, June 9, 2016
  • by jeremygiberson
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Migrations Boilerplate

This project wires up Doctrine ORM & Migrations., (*1)

The project contains a working ORM + Migrations wiring/configuration. It's not a statement of best practices or anything, just a working example to get you going. Feel free to change things to your preference needs., (*2)

In order to use the command line tools you need to create the Entity Manager and provide the configuration to your model/mapping paths. But you'll also need the same configuration to create the Entity Manager in your application code. Rather than put this configuration in your application configuration or bootstrap, it's a good idea to keep entity manager & ORM configuration in a separate tiny config file. This lets you reuse the config in your app bootstrap and your command line config (and or test suite configs) without having to bootstrap your app config. This is just a suggestion though and you don't have to follow it., (*3)

Installation

Use composer to create a new project based off this boilerplate., (*4)

composer create-project jeremygiberson/doctrine-migrations-boilerplate my-project
cd my-project

Overrides

See doctrine-config.php.dist for overridable values. To override, copy the file to doctrine-config.php and change values to match your requirements., (*5)

Usage

Status

Check migrations status, (*6)

vendor/bin/doctrine-migrations migrations:status, (*7)

Migrate

Run pending migrations, (*8)

vendor/bin/doctrine-migrations migrations:migrate, (*9)

Diff

Generate a migration file by comparing current schema to your model definitions., (*10)

vendor/bin/doctrine-migrations migrations:diff, (*11)

Other Commands

There are other commands available. You can see the list by running doctrine-migration without arguments., (*12)

vendor/bin/doctrine-migrations, (*13)

The Versions

09/06 2016

dev-master

9999999-dev

Doctrine ORM & Doctrine Migrations project w/ configuration and wiring. Going through the documentation for either project and putting them together can be a pain the first few times. This project provides the end result as sometimes a working example is better documentation.

  Sources   Download

MIT

The Requires

 

by Jeremy Giberson

09/06 2016

1.0.0

1.0.0.0

Doctrine ORM & Doctrine Migrations project w/ configuration and wiring. Going through the documentation for either project and putting them together can be a pain the first few times. This project provides the end result as sometimes a working example is better documentation.

  Sources   Download

MIT

The Requires

 

by Jeremy Giberson