PHPackages                             ianzhang001/sql-generator - 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. ianzhang001/sql-generator

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

ianzhang001/sql-generator
=========================

convert Laravel migrations to raw SQL scripts

161PHP

Since Jan 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ianzhang001/sql-generator)[ Packagist](https://packagist.org/packages/ianzhang001/sql-generator)[ RSS](/packages/ianzhang001-sql-generator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

![Packagist License](https://camo.githubusercontent.com/c324abb022417bf84ebfc664b7c57c0bc0f89f37879c8fd7c0e9a1c69ab66e1d/68747470733a2f2f706f7365722e707567782e6f72672f66726f6964656e2f73716c2d67656e657261746f722f6c6963656e73652e706e67)[![Total Downloads](https://camo.githubusercontent.com/935c1a3d113507032c664f4128941c2995eb429b1bf95f4591202215d13dad5b/68747470733a2f2f706f7365722e707567782e6f72672f66726f6964656e2f73716c2d67656e657261746f722f642f746f74616c2e706e67)](https://packagist.org/packages/froiden/sql-generator)

LARAVEL SQL GENERATOR
=====================

[](#laravel-sql-generator)

Convert Laravel migrations to raw SQL scripts

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require "froiden/sql-generator:dev-master"

```

### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

Now add the following to the providers array in your config/app.php

```
\Froiden\SqlGenerator\SqlGeneratorServiceProvider::class,
```

### Step 3: Now publish the vendor

[](#step-3-now-publish-the-vendor)

```
php artisan vendor:publish
```

### Step 4: Run command

[](#step-4-run-command)

Then you will need to run these commands in the terminal

```
php artisan sql:generate
```

This Will Generate "database.sql" in 'database/sql' directory If you want change path directory go to 'config/sql\_generator.php' change value 'defaultDirectory'

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.2% 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.

### Community

---

Top Contributors

[![jackinos](https://avatars.githubusercontent.com/u/17823071?v=4)](https://github.com/jackinos "jackinos (16 commits)")[![ianzhang001](https://avatars.githubusercontent.com/u/4486912?v=4)](https://github.com/ianzhang001 "ianzhang001 (3 commits)")[![ajayfroiden](https://avatars.githubusercontent.com/u/6275382?v=4)](https://github.com/ajayfroiden "ajayfroiden (2 commits)")

### Embed Badge

![Health badge](/badges/ianzhang001-sql-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ianzhang001-sql-generator/health.svg)](https://phpackages.com/packages/ianzhang001-sql-generator)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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