romanzipp/laravel-migration-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

romanzipp/laravel-migration-generator

Composer 安装命令:

composer require romanzipp/laravel-migration-generator

包简介

Laravel Migration Generator

README 文档

README

Latest Stable Version Total Downloads License GitHub Build Status SQLite GitHub Build Status MySQL GitHub Build Status MariaDB

⚠️ WORK IN PROGRESS ⚠️

Generate Laravel migration files from existing databases.

Installation

composer require romanzipp/laravel-migration-generator

If you use Laravel 5.5+ you are already done, otherwise continue.

Add Service Provider to your app.php configuration file:

romanzipp\MigrationGenerator\Providers\MigrationGeneratorProvider::class,

Configuration

Copy configuration to config folder:

$ php artisan vendor:publish --provider="romanzipp\MigrationGenerator\Providers\MigrationGeneratorProvider"

Usage

php artisan mg:generate {--connection=}

You will see various new migration files prefixed with the current time & date.

Notice: This package can't guess the order in which migrations will be created. If you've created some foreign keys in your database, be sure to re-order the migration files based on these relations.

Supported Databases

Features

  • Tables
  • Columns
  • Column modifiers (nullable, default, ...)
  • Indexes
  • Foreign keys

Testing

There are tests with the following matrix.

  • PHP
    • 7.2
    • 7.3
    • 7.4
    • 8.0
    • 8.1
    • 8.2
  • Databases
    • SQLite
    • MySQL
    • MariaDB
  • Composer dependency versions
    • latest
    • lowest

SQLite

./vendor/bin/phpunit

MySQL / MariaDB

Requires a running MySQL / MariaDB server

./vendor/bin/phpunit -c phpunit.mysql.xml

Provide database environment variables

DB_HOST=127.0.0.1 DB_USERNAME=user DB_PASSWORD=secret ./vendor/bin/phpunit -c phpunit.mysql.xml

Known issues

  • MariaDB: The JSON MySQL data type is not supported since Doctrine/DBAL interprets this as Doctrine\DBAL\Types\TextType
  • MySQL: Doctrine/DBAL can't differentiate between TEXT, LONGTEXT, MEDIUMTEXT

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固