承接 levizoesch/laravel-check-migrations 相关项目开发

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

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

levizoesch/laravel-check-migrations

最新稳定版本:1.0.2

Composer 安装命令:

composer create-project levizoesch/laravel-check-migrations

包简介

A Laravel command scans your application for pending migrations, providing a clear overview of what needs to be migrated.You can then choose to run individual migrations or skip them as needed, short-cutting and optimizing your development workflow.

README 文档

README

A Laravel command scans your application for pending migrations, providing a clear overview of what needs to be migrated. You can then choose to run individual migrations or skip them as needed, short-cutting and optimizing your development workflow.

Support for Structured Migrations

This package seamlessly handles migrations organized within subdirectories, ensuring that no pending migrations are overlooked regardless of the project's migration structure.

database
└── migrations
├── 2023_01_01
│ ├── 20230101000001_create_table_one.php
│ └── 20230101000002_create_table_two.php
└── 2023_02_01
├── 20230201000001_create_table_three.php
└── 20230201000002_create_table_four.php

Installation

composer require levizoesch/laravel-check-migrations

Usage

Run the following command in your terminal:

This will display pending migrations and prompt for confirmation before running each one.

php artisan check-migrations

This will skip confirmation and run pending migrations directly.

php artisan check-migrations --skip

This will ignore the migration named 20230101000000_create_example_table from running and prompting for confirmation.

php artisan check-migrations --ignore=20230101000000_create_example_table

Notes

Ensure that your Laravel project is properly configured and migrations are set up correctly for this command to work effectively.

Always review pending migrations before running them in production environments to prevent unintended consequences.

Known Issues

Double Confirmation Prompts in Production

When running the check-migrations command in a production environment, users may encounter double confirmation prompts. This occurs due to Laravel's native migrate command prompting for confirmation before migrating when in production mode. Since the check-migrations command internally calls the migrate command for each pending migration, users may be prompted twice for confirmation for each migration.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-27