jiabin / migraine
PHP的简单迁移工具
v1.0.0
2014-06-23 22:24 UTC
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-09-24 00:19:29 UTC
README
Migraine 是一个基于 PHP 的命令行工具,用于简化创建/执行迁移的过程。
要求
Migraine 的唯一要求是 PHP 5.4+
安装
curl -sS http://jiabin.github.io/migraine/installer | /bin/bash
快速开始
显示所有可用命令
php migraine.phar
迁移到最新版本
php migraine.phar migrate
创建新的迁移
php migraine.phar create
打印版本并退出
php migraine.phar -V
命令参考
支持类型
- file
- mongo
- redis
支持桥梁
1) Composer
配置参考
2) Symfony
配置参考
示例配置(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
报告问题或功能请求
问题和功能请求在 Github 问题跟踪器 中跟踪。
贡献
首先你需要安装 composer 依赖
composer install
现在你可以通过运行 migraine
./bin/migraine
要构建 phar 文件,你需要 box
box build
然后你可以通过以下方式启动应用程序
./migraine.phar