phplucidframe / bare-migration
一个简单的PHP命令行工具,用于生成CodeIgniter裸迁移文件。
v1.1.0
2016-11-04 15:14 UTC
Requires
- php: >=5.3
This package is auto-updated.
Last update: 2024-08-29 04:31:10 UTC
README
一个简单的PHP命令行工具,用于生成CodeIgniter空白迁移类文件。它与Symfony的doctrine:migrations:generate
(请参阅DoctrineMigrationsBundle)非常相似。
使用Composer安装
composer require phplucidframe/bare-migration
或
php composer.phar require phplucidframe/bare-migration
不使用Composer安装
如果您不想使用Composer,可以下载zip文件并将其解压缩到项目的vendor文件夹中。但是,请确保目录路径是/vendor/phplucidframe/bare-migration/
,其中应存在脚本文件ci
。
示例用法
$ php vendor/phplucidframe/bare-migration/ci migration:bare add_new_post_table
或者,您也可以切换到包目录。
$ cd vendor/phplucidframe/bare-migration
$ php ci migration:bare add_new_post_table
上述示例将创建一个新的迁移文件application/migrations/{YmdHis}_add_new_post_table.php
,其中{YmdHis}
将代表当前的时间戳。