定制 esempla/yii2tech-dump-migration 二次开发

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

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

esempla/yii2tech-dump-migration

Composer 安装命令:

composer require esempla/yii2tech-dump-migration

包简介

Generate the schema from an existing database

README 文档

README

Generate data migration file from an existing database This module is rewritten by Esempla based on https://github.com/bizley/yii2-migration. This module is designed for internal use, can be used freely, the company does not provide any warranty for it.

For orginal package try:

github: https://github.com/Hzhihua/yii2-dump
oschina: http://git.oschina.net/hzhihua/yii2-dump

Demo

yii2-dump

Test Environment

  • PHP >=7.1.0
  • PGSQL(<9.*)

Installation

composer require --prefer-dist "esempla/yii2tech-dump-migration:0.1.0"

Configuration

Add the following in console/config/main.php:

Simple Configuration

return [
    'dump' => [
         'class' => 'esempla\\yii2tech_dump_migration\\DumpController',
         'db' => 'db1', // Connection
         'generateFilePath' =>'@app/migrations/test/data',
         'limit' => '0,1000', // select * from tableName limit 0,1000
     ],
];

Default Limit

0,1000

Default Filter Table

migration

Simple Usage

run dump command.

cd /path/to/your-project
./yii dump   -type=1 --db='db1' # default action: generate, it will gerate migration file

Commands

generate all over the table migration file but it only had some data between 0 and 10

./yii dump -limit=10   -type=1 --db='db1' 

only generate table1,table2 migration file

./yii dump -table=table1,table2  -type=1 --db='db1' 

统计信息

  • 总下载量: 209
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-02-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固