定制 magein/think-migration 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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官方文档

think-migration

功能

  1. 数据库配置文件使用thinkphp的db
  2. 支持服务类加载
{
  "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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-26