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

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

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

mrazinshaikh/laravel-migration

Composer 安装命令:

composer require mrazinshaikh/laravel-migration

包简介

A standalone migration tool using laravel illuminate/database.

README 文档

README

A standalone migration tool using laravel illuminate/database.

Packagist StyleCI PHP Versions Supported Latest Stable Version Total Downloads License Latest Unstable Version composer.lock available

The Laravel Migrations package is a standalone migration tool designed to bring the powerful and flexible migration capabilities of Laravel's illuminate/database component to any PHP project. Whether you are building a small application or a large enterprise system, this package allows you to manage your database schema with ease and precision. With features like creating, running, and rolling back migrations, this tool integrates seamlessly into your workflow. The package also provides user-friendly command-line prompts and detailed output, ensuring that database migrations are straightforward and manageable. Perfect for developers who want to leverage Laravel's robust database migration system outside of a full Laravel framework, this package provides the tools you need to keep your database schema in sync with your application's evolving requirements.

Installation

  1. Install the package.
composer require mrazinshaikh/laravel-migration
  1. Publish the configuration file.
./vendor/bin/laravel-migration config:publish

Update config/laravel-migration.php with your database connection credentials.

  1. To list all available commands, run:
./vendor/bin/laravel-migration

or

./vendor/bin/laravel-migration list

Available Commands

migrate

Run the database migrations or roll them back.

./vendor/bin/laravel-migration migrate

Options:

  • --down: Rollback migrated migrations.
./vendor/bin/laravel-migration migrate --down

migrate:fresh

Drop all tables (only tables created through migrations) and re-run all migrations.

./vendor/bin/laravel-migration migrate:fresh

migrate:install (not required - it will be executed internally on migration.)

Install the migrations table.

./vendor/bin/laravel-migration migrate:install

make:migration

Create a new migration file.

./vendor/bin/laravel-migration make:migration
  • You will be propted for migration name.
  • Then propmpt to name the db table will be show, it will try to guess the table name from migration name asked previously, and pre-fill this input, and this input will be blank if not able to guess the table name.

config:publish

Publish the configuration file.

./vendor/bin/laravel-migration config:publish

Options:

  • --force: Override the currently exposed config file.

Roadmap

  • Make this work in a way so migrations folder exists in end user root directory (customizable in future.)

    • expose artisan to vendor/bin folder. rename to migration.
    • attempt to use illuminate\database Create migration '\Illuminate\Database\Migrations\MigrationCreator'
  • Add config:show command, to show parsed config.

  • Extend migrate command to run specific migration file using --path option.

  • Install nunomaduro/termwind

    • php artisan available commands list equal distance between command and description message.
    • In MigrateCommand getTerminalWidth replace with termwind get terminal width instead
    • improve output message stylings
  • Implement wipe command to read all migration file and drop those tables from db.

mrazinshaikh/laravel-migration 适用场景与选型建议

mrazinshaikh/laravel-migration 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 06 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mrazinshaikh/laravel-migration 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mrazinshaikh/laravel-migration 我们能提供哪些服务?
定制开发 / 二次开发

基于 mrazinshaikh/laravel-migration 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-01