PHPackages                             josh-taylor/migrate-sql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. josh-taylor/migrate-sql

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

josh-taylor/migrate-sql
=======================

Display the SQL for a migration in Laravel

1.1.1(7y ago)195792MITPHPPHP ^7.0

Since May 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/josh-taylor/migrate-sql)[ Packagist](https://packagist.org/packages/josh-taylor/migrate-sql)[ RSS](/packages/josh-taylor-migrate-sql/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (5)Versions (7)Used By (0)

Generate the SQL for Laravel migrations
=======================================

[](#generate-the-sql-for-laravel-migrations)

[![Build Status](https://camo.githubusercontent.com/b926eeb388c8e50ced79953af73279947cb8a262d3b538d0b5226cd17ec6447a/68747470733a2f2f7472617669732d63692e6f72672f6a6f73682d7461796c6f722f6d6967726174652d73716c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/josh-taylor/migrate-sql)[![Packagist](https://camo.githubusercontent.com/c360c689a46ad043f210a22a2ec09c2ddde7f3701c3acad36cf01778fe897542/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f73682d7461796c6f722f6d6967726174652d73716c2e737667)](https://packagist.org/packages/josh-taylor/migrate-sql)

Sometimes it's not possible to run `php artisan migrate` and you have to manually run migrations.

This Laravel package adds a command to generate the SQL that a migration will use. It's a bit like the `--pretend` option for `php artisan migrate` but will show migrations that have already run.

Installation
------------

[](#installation)

This package requires PHP 7 and Laravel 5.5 or higher.

You can install the package via composer using:

```
composer require josh-taylor/migrate-sql

```

This will automatically register the service provider and command.

Usage
-----

[](#usage)

A new command will be added to your Laravel project.

```
php artisan migrate:sql

```

You can view the help screen for more options

```
php artisan migrate:sql -h

```

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit

```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~34 days

Total

6

Last Release

2826d ago

Major Versions

0.3.0 → 1.0.02018-05-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e90bb8326f039d305035461e206f1d05cbc2887de66586ca9f755905b4cd660?d=identicon)[josh-taylor](/maintainers/josh-taylor)

---

Top Contributors

[![josh-taylor](https://avatars.githubusercontent.com/u/675003?v=4)](https://github.com/josh-taylor "josh-taylor (16 commits)")[![takamichi](https://avatars.githubusercontent.com/u/1865622?v=4)](https://github.com/takamichi "takamichi (1 commits)")

---

Tags

databasedatabase-migrationslaravellaravel-migrationmigrationsphptestablelaravelmigrationsql

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/josh-taylor-migrate-sql/health.svg)

```
[![Health](https://phpackages.com/badges/josh-taylor-migrate-sql/health.svg)](https://phpackages.com/packages/josh-taylor-migrate-sql)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.7k](/packages/larastan-larastan)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k41.3M604](/packages/spatie-laravel-medialibrary)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

438834.4k1](/packages/clickbar-laravel-magellan)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
