kba-team/phinx-cake2
最新稳定版本:v1.2.2
Composer 安装命令:
composer require kba-team/phinx-cake2
包简介
Easy usage of Phinx with CakePHP2
README 文档
README
Phinx is the default tool for database migrations in CakePHP3 and CakePHP4. Phinx can be used as a standalone tool, so it is possible to use it with CakePHP2. This project makes usage of Phinx with CakePHP2 less complicated.
Prerequisites
- PHP >= 7.0
- CakePHP2 installed via composer
- Mysql (no other DB supported a the moment)
- Migrations in folder Config/Migrations
- Seeds in folder Config/Seeds
What does it do?
This package provides a helper script and a default Phinx config file for usage with you CakePHP2 project.
By using the helper script it is not necessary to create a Phinx configuration for your project.
Installation
composer require kba-team/phinx-cake2
Usage
Usage: phinx-cake2.sh [command] [arguments] [options]
Example
./vendor/bin/phinx-cake2.sh migrate
If you want to migrate a plugin's migration.
PLUGIN=<plugin_name> ./vendor/bin/phinx-cake2.sh migrate
In case the plugin uses its own database, you need to set the following in a file called phinx.php in the plugin's Config directory.
Configure::write('phinx.datasource', "<datasource name>");
统计信息
- 总下载量: 9.77k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-16