magein/think-migration
最新稳定版本:v4.0.0
Composer 安装命令:
composer require magein/think-migration
包简介
基于magein/migration重新封装的面向对象形式的数据库迁移类
README 文档
README
简介
依赖magein/migration创建适用于thinkphp的扩展包,
magein/migration与think-migration区别在于写法,前者支持链式调用
magein/migration gitee | composer
功能
- 数据库配置文件使用thinkphp的db
- 支持服务类加载
{
"extra": {
"think": {
"services": [
"magein\\think\\migration\\MigrationService"
]
}
}
}
安装
composer require magein/think-migration
使用
可选配置
在config/console.php添加一下配置
[
'command'=>[
'migrate:new'=>MigrateCommand::class,
'mi:new'=>MigrateCommand::class,
'mi:create'=>MigrateCommand::class,
'mi:run'=>MigrateCommand::class,
]
]
运行
# think后面的 1:2 取决于console.php你配置的
php think migate:new --help
php think migate:new user
php think mi:new user
php think mi:create user
php think mi:run user
# 执行
php think migate:new user run
php think migate:new run
# 回滚
php think migate:new user rollback
php think migate:new rollback
统计信息
- 总下载量: 119
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-26