定制 tjura/yii2-migration-helper 二次开发

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

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

tjura/yii2-migration-helper

最新稳定版本:1.0.1

Composer 安装命令:

composer require tjura/yii2-migration-helper

包简介

Interactive migration generator for Yii2

关键字:

README 文档

README

PHP Versions Supported Framework

Integration time and difficulty

  • Around 5 minutes
  • Very easy

Requirements

  • PHP >= 8.1
  • Yii2 >= 2.0.8

Description && How its works

This is an interactive Yii migrate command expansion. It will help you to create basic migrations using question in command line. This extension basically creating commands according Yii documentation https://www.yiiframework.com/doc/guide/2.0/en/db-migrations

Example output:

yii migrate/create create_post_table --fields="title:string,body:text,author_id:integer:notNull:foreignKey(user)"

Usage

php yii migrate

Available options

  1. Create table
  2. Drop table
  3. Add column
  4. Drop Column
  5. Add Junction Table
  6. Redo last
  7. Down last
  8. Create empty migration
  9. Up

Installation instructions

composer require tjura/yii2-migration-helper

Update your console.php config file

'controllerMap' => [
    'migrate' => [
        'class' => \tjura\migration\commands\MigrateController::class,
    ]
]

Dev notes

  • This project was created for help me understand how to create good quality opensource extension and also to improve everyday tasks when working on Yii2 projects.

What's next

  • Improve code quality and write unit tests
  • Release improved version for older php 7.x

统计信息

  • 总下载量: 2.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-13