Download the PHP package tarunkorat/laravel-migration-squasher without Composer

On this page you can find all versions of the php package tarunkorat/laravel-migration-squasher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-migration-squasher

Laravel Migration Squasher

Latest Version on Packagist Total Downloads License

Squash old Laravel migrations into a single schema file to keep your migrations folder clean and manageable.

Fully compatible with Laravel 8, 9, 10, 11, and 12!

โœจ Features

๐Ÿ“‹ Requirements

๐Ÿ“ฆ Installation

Install the package via composer:

The package will automatically register itself via Laravel's package discovery.

Publish Configuration (Optional)

This will create config/migration-squasher.php file.

๐Ÿš€ Usage

Basic Usage

Squash all migrations before a specific date, keeping the 10 most recent:

Preview Changes (Dry Run)

See what would be squashed without making any changes:

Custom Options

โš™๏ธ Configuration

The config file provides several options:

๐Ÿ“Š Before & After Example

Before Squashing

Total: 100 migration files ๐Ÿ˜ฐ

After Squashing

Total: 4 migration files ๐ŸŽ‰

๐ŸŽฏ When to Use This Package

โœ… Perfect For:

โŒ Not Recommended For:

๐Ÿ”ง How It Works

  1. Analyzes all migrations in your project
  2. Identifies migrations older than specified date
  3. Keeps the most recent N migrations separate
  4. Generates a schema dump from your current database structure
  5. Creates backup of squashed migrations (optional)
  6. Deletes old migration files
  7. Updates migrations table (optional)

Important Notes

๐Ÿงช Testing

๐Ÿ“ˆ Performance Comparison

Metric Before Squash After Squash Improvement
Migration Files 167 files 11 files 93% reduction
migrate:fresh Time 8 minutes 45 seconds 90% faster
CI/CD Pipeline 2 min migrations 30 sec migrations 75% faster
Codebase Clarity Cluttered Clean Much better

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“ Changelog

Please see CHANGELOG for more information on what has changed recently.

๐Ÿ”’ Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.

๐Ÿ’ก Credits

๐Ÿ™ Support

If you find this package helpful, please consider:


Made with โค๏ธ for the Laravel community


All versions of laravel-migration-squasher with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2|^8.3
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^8.0|^9.0|^10.0|^11.0|^12.0
doctrine/dbal Version ^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tarunkorat/laravel-migration-squasher contains the following files

Loading the files please wait ...