Download the PHP package n3xt0r/laravel-migration-generator without Composer

On this page you can find all versions of the php package n3xt0r/laravel-migration-generator. 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-generator

Laravel Migration Generator

CI Latest Stable Version Code Coverage Maintainability License Docs DB Support Total Downloads

🧱 Original project launched in May 2020. Recently reactivated and extended with full CI coverage and support for PostgreSQL, MariaDB, MSSQL and MySQL 8.

βœ… CI: Successfully tested across MySQL 5.7/8.0, PostgreSQL 15, and MSSQL 2022 – on Laravel 12-13 and PHP 8.3–8.5.

πŸ“¦ Overview

Laravel Migration Generator
A powerful CLI tool to generate Laravel migration files from an existing MySQL, PostgreSQL or MSSQL database.

This tool provides a structured and extensible approach to reverse‑engineering database schemas into Laravel‑compatible migration files. It supports foreign key constraints, correct dependency order and customizable mapping logic – enabling seamless integration into both legacy and modern Laravel projects (Laravel 5–13 supported).

✨ Features

πŸ” Feature Comparison

Feature / Tool This Package (N3XT0R) kitloong bennett‑treptow Xethron
πŸ› οΈ Supported Databases βœ… MySQL, PostgreSQL, MSSQL βœ… MySQL, PostgreSQL, MSSQL, SQLite βœ… MySQL only βœ… MySQL only
βš™ Laravel Compatibility βœ… 5–13 (version-aware testing) βœ… 5–10+ ⚠️ up to Laravel 11 ❌ Legacy only
πŸ§ͺ CI/CD with Matrix Testing βœ… Full GitHub Actions matrix ❌ Partial ❌ Partial ❌ None
🧩 Extensible Mapping Architecture βœ… Yes (definition + mapping layers) ❌ Monolithic ❌ No ❌ No
πŸ”’ Actively Maintained βœ… Yes (since 2023) βœ… Yes βœ… Partially ❌ No
🐘 PostgreSQL Support βœ… Yes βœ… Yes ❌ No ❌ No
πŸͺŸ MSSQL Support βœ… Yes βœ… Yes ❌ No ❌ No
πŸ’‘ Primary Use Case βœ… Modern & legacy DB export βš™οΈ Feature-rich 🧱 MySQL legacy only πŸ•°οΈ Historical tool

TL;DR: If you need clean, testable, and modern Laravel migration exports across multiple DB engines – this tool is a solid and extensible choice.

πŸ“Š Version Compatibility

Laravel PHP Version Generator Version Status
5.x 7.2 – 7.4 1.0.10 ❌ EOL
6.x 7.2 – 7.4 1.0.10 ❌ EOL
7.x 7.2 – 8.0 2.0.0 ❌ EOL
8.x 7.3 – 8.0 3.0.0 ❌ EOL
9.x 8.0 4.0.0 ❌ EOL
10.x 8.1 – 8.3 5.0.0 ❌ EOL
10.x 8.1 – 8.3 8.3.0 >= 8.0.0 ❌ EOL
11.x 8.2 – 8.4 6.0.0 ❌ EOL
11.x 8.2 – 8.4 8.x ❌ EOL
12.x 8.2 – 8.4 7.0.0 ❌ EOL
12.x 8.2 – 8.5 8.x ⚠️ Security fixes only
13.x 8.3 – 8.5 9.x βœ… Supported

⚠️ Important: Version 8.0.0 introduces breaking API changes for Laravel 10–12.
All supported Laravel versions receive the new features and updated APIs, requiring updates to dependent code.


βœ… Database Compatibility

The generator works with all major engines:

MySQL

Version Status
5.7 βœ… Supported
8.0 βœ… Supported

PostgreSQL

Version Status
15 βœ… Supported

MSSQL

Version Status
2022-latest βœ… Supported

EOL database versions remain functional for legacy compatibility.

βš™ Requirements

🧰 Installation

Install the package via Composer:

Laravel will auto-discover the service provider. No manual registration is needed.

For Lumen, register the service provider manually in bootstrap/app.php:

πŸš€ Usage

Run the migration generator via Artisan:

This command will generate migration files from your existing database schema into the database/migrations/ folder. The files will be ordered automatically to maintain referential integrity – no manual reordering required.

βš™οΈ Custom Export Strategy

If the default export does not meet your needs, the generator is fully extensible. You can override the export logic through Laravel's Dependency Injection container.

πŸ”§ Configuration

First, publish the configuration file:

Edit config/migration-generator.php to adjust or override definitions and mappings.

🧩 Export Architecture

The export process is divided into two customizable layers:

Definition Classes

These classes extract schema information into a universal, internal representation. This format is decoupled from Laravel and can be reused, extended, or mapped differently.

Mapping Classes

These classes transform the internal representation into valid Laravel migration code (PHP). You can override them to adjust formatting, naming conventions, or structure.

🧰 Schema Normalizers

Schema Normalizers are optional pre-processing steps that transform your database schema before migration generation. They can help adapt legacy structures for better Laravel compatibility.

Available Normalizers

Normalizer Description
pivot Replaces composite primary keys with a synthetic auto-incrementing id() column and converts the original composite key into a named unique() constraint. Useful for legacy tables incompatible with Eloquent.

Usage

Enable a normalizer via CLI:

Or configure it in config/migration-generator.php:

πŸ§ͺ Testing

To run the tests:

Docker and CI pipelines are already integrated for continuous validation and quality assurance.

Key CI features include:

ℹ️ Composer Compatibility Strategy

Although the root composer.json targets Laravel 12 by default, earlier Laravel versions (10, 11) are tested in CI using dynamic version installation:

This ensures flexible version handling while keeping the default installation aligned with the latest stable Laravel release.

πŸ§ͺ Version-Aware Assertions

Table-based tests (e.g., migration sorting or detection) dynamically adjust expected values based on the Laravel version:

πŸ“„ License

This project is licensed under the MIT License.

πŸ™Œ Contributions

Contributions are welcome! Feel free to open issues or submit pull requests to improve the generator, add new database support or enhance the customization layers.

πŸ”— Links

This README reflects the repository’s current features, including explicit support for MySQL, PostgreSQL and MSSQL, correct PDO extensions and updated CI information.


All versions of laravel-migration-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-pdo_mysql Version *
doctrine/dbal Version ^3.0
laravel/framework Version ^12.0||^13.0
marcj/topsort Version ^1.1||^2.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 n3xt0r/laravel-migration-generator contains the following files

Loading the files please wait ...