Coder Social home page Coder Social logo

vershnik / migrations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doctrine/migrations

0.0 2.0 0.0 564 KB

Doctrine Database Migrations Library

Home Page: http://www.doctrine-project.org/projects/migrations.html

License: GNU Lesser General Public License v2.1

PHP 100.00%

migrations's Introduction

Doctrine Database Migrations

Status

Build Status Dependency Status

Eric Clemmons' Modifications

The latest official PHAR had path issues for me, so I made a couple of modifications and made packaging a bit easier, especially when creating a custom PHAR for your own apps.

Download doctrine-migrations.phar with custom Input/Output CLI support

Modifications

  • Added DiffCommand for migrations.
  • Support for custom ArgvInput in CLI instance
  • Support for custom ConsoleOutput in CLI instance

In the same way that Doctrine will attempt to load the return values from migrations-db.php as your connection parameters, you can have migrations-input.php return:

$input = new \Symfony\Component\Console\Input\ArgvInput;
... make some changes ...
return $input;

or have migrations-output.php return a customized ConsoleOutput with support for HTML tags in your SQL statements:

$output = new \Symfony\Component\Console\Output\ConsoleOutput;
$output->setStyle('p');
return $output;

This should give you the flexibility you need for customizing your input/output in the CLI.

Building Your Phar

Make sure Composer and all necessary dependencies are installed:

curl -s https://getcomposer.org/installer | php
php composer.phar install --dev

Make sure that the Box project is installed:

curl -s http://box-project.org/installer.php | php

Build the PHAR archive:

php box.phar build

The doctrine-migrations.phar archive is built in the build directory.

Creating archive disabled by INI setting

If you receive an error that looks like:

creating archive "build/doctrine-migrations.phar" disabled by INI setting

This can be fixed by setting the following in your php.ini:

; http://php.net/phar.readonly
phar.readonly = Off

Installing Dependencies

To install dependencies run a composer update:

composer update

Official Documentation

All available documentation can be found here.

migrations's People

Contributors

beberlei avatar stof avatar jwage avatar denderello avatar mikesimonson avatar rjmunro avatar kriswallsmith avatar lsmith77 avatar simensen avatar tombevers avatar maxim-oleinik avatar thanosp avatar pezia avatar louiscytc avatar fabpot avatar ornicar avatar kimhemsoe avatar arnaud-lb avatar aderuwe avatar jean85 avatar jalliot avatar korstiaan avatar bountin avatar mpdude avatar puppe0 avatar mrtorrent avatar pborreli avatar kander-zz avatar sdellysse avatar nyholm avatar

Watchers

Andrei Bastun avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.