承接 nachopitt/migrations 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nachopitt/migrations

最新稳定版本:v0.6.0

Composer 安装命令:

composer require nachopitt/migrations

包简介

README 文档

README

Migrations is a Laravel package that adds a new migrate:* artisan command: import.

You can easily create new migration files by using a SQL import file as an input for the command.

It is based on stock make:migrate artisan command.

Installation

composer require nachopitt/migrations

Usage

php artisan migrate:import {file? : The SQL file to be imported}
    {--schema= : The name of the schema}
    {--path= : The location where the migration file should be created}
    {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths}
    {--fullpath : Output the full path of the migration}
    {--squash : Generate one migration file instead of multiple files}
    {--withoutForeignKeyConstraints : Avoid adding foreign key constraints to the migration}

If file argument is not provided, the default value would be database_model/${database}.sql, where ${database} is the default database name.

Options

  • --schema: The name of the schema to be used in the migration.
  • --path: The location where the migration file should be created.
  • --realpath: Indicate that the provided migration file paths are pre-resolved absolute paths.
  • --fullpath: Output the full path of the migration.
  • --squash: Generate one migration file instead of multiple files. This is useful when you want to combine multiple SQL statements into a single migration.
  • --withoutForeignKeyConstraints: Avoid adding foreign key constraints to the migration.

Once finished, the new migration files will be placed in the usual migrations directory (database/migrations) and will follow the usual naming conventions.

The name of the migration files will depend on the number of CREATE, ALTER and DROP SQL statements.

Features

The migrate:import command is able to handle CREATE, ALTER and DROP SQL statements.

When used in conjuntion with a tool like PHP MySQL Diff the process of generating the migration files could be automated somehow.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固