jiabin / migraine
Damn simple migrations for PHP
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=5.3.0
- doctrine/collections: ~1.0
- herrera-io/phar-update: ~2.0
- monolog/monolog: ~1.7
- predis/predis: ~0.8
- symfony/config: ~2.3
- symfony/console: ~2.3
- symfony/finder: ~2.3
- symfony/options-resolver: ~2.3
- symfony/yaml: ~2.3
Requires (Dev)
- phpunit/phpunit: 3.7.*
Suggests
- ext-mongo: *
This package is auto-updated.
Last update: 2024-10-24 00:34:35 UTC
README
Migraine is a PHP-based command-line utility for simplifying the process of creating/executing migrations.
Requirements
The only requirement for Migraine is PHP 5.4+
Install
curl -sS http://jiabin.github.io/migraine/installer | /bin/bash
Quick start
Show all available commands
php migraine.phar
Migrate to the latest version
php migraine.phar migrate
Create a new migration
php migraine.phar create
Print version and exit
php migraine.phar -V
Commands reference
Supported types
- file
- mongo
- redis
Supported bridges
1) Composer
Configuration reference
2) Symfony
Configuration reference
Sample configuration (migraine.yml)
# Migrations will be stored and read from this path
migrations_path: ./migrations
# Number of "zeros" to append to version
pad_length: 3
# Application bridge
bridge:
# One of "composer"; "symfony"
name: composer # Required
# Bridge options
options:
autoload: vendor/autoload.php
# Type configuration
types:
file:
lock_file: migraine.lock
# redis:
# host: 'tcp://localhost:6379'
# prefix: null
# mongo:
# server: 'mongodb://localhost:27017'
# database: migraine
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker.
Contributing
First you need to install composer dependencies:
composer install
Now you can run migraine by:
./bin/migraine
To build a phar file you will need box
box build
Then you can launch the app by:
./migraine.phar