PHPackages                             lastdragon-ru/lara-asp-migrator - 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. lastdragon-ru/lara-asp-migrator

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

lastdragon-ru/lara-asp-migrator
===============================

Improves standard Laravel migrations to add support for raw SQL files during migration and seeding. So you can easily use your favorite visual tool for database development with Laravel.

11.1.0(1mo ago)07.9kMITPHPPHP ^8.4|^8.5

Since Jan 19Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/LastDragon-ru/lara-asp-migrator)[ Packagist](https://packagist.org/packages/lastdragon-ru/lara-asp-migrator)[ Docs](https://github.com/LastDragon-ru/php-packages)[ RSS](/packages/lastdragon-ru-lara-asp-migrator/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (70)Versions (86)Used By (0)

(Laravel) Raw SQL Migrator/Seeder
=================================

[](#laravel-raw-sql-migratorseeder)

This package improves standard Laravel migrations to add support for raw SQL files during migration and seeding. So you can easily use your favorite visual tool for database development like [MySQL Workbench](https://www.mysql.com/products/workbench/) with Laravel 🥳

Important

The Migrator uses the same mechanism as [Squashing Migrations](https://laravel.com/docs/migrations#squashing-migrations) so not all databases are supported, please see Laravel Documentation for more details.

Requirements
============

[](#requirements)

RequirementConstraintSupported byPHP`^8.5``HEAD ⋯ 11.0.0``^8.4``HEAD ⋯ 8.0.0``^8.3``10.3.0 ⋯ 5.0.0``^8.2``7.2.0 ⋯ 2.0.0``^8.1``6.4.2 ⋯ 2.0.0``^8.0``4.6.0 ⋯ 2.0.0``^8.0.0``1.1.2 ⋯ 0.12.0``>=8.0.0``0.11.0 ⋯ 0.4.0``>=7.4.0``0.3.0 ⋯ 0.1.0`Laravel`^13.10.0``HEAD` , `11.1.0``^13.0.0``11.0.0``^12.0.1``10.3.0 ⋯ 9.0.0``^11.0.8``8.1.1 ⋯ 8.0.0``^11.0.0``7.2.0 ⋯ 6.2.0``^10.34.0``7.2.0 ⋯ 6.2.0``^10.0.0``6.1.0 ⋯ 2.1.0``^9.21.0``5.6.0 ⋯ 5.0.0-beta.1``^9.0.0``5.0.0-beta.0 ⋯ 0.12.0``^8.22.1``3.0.0 ⋯ 0.2.0``^8.0``0.1.0`Installation
============

[](#installation)

```
composer require lastdragon-ru/lara-asp-migrator
```

Migrations
==========

[](#migrations)

To create migration, just use the following [command](docs/Commands/sql-migration.md):

```
php artisan lara-asp-migrator:sql-migration MyMigration
```

It will create the following files in `database/migrations`:

```
2020_11_05_170802_my_migration.php
2020_11_05_170802_my_migration~down.sql
2020_11_05_170802_my_migration~up.sql

```

Usually, you just need to put your SQL into `*~up.sql` and `*~down.sql` 😇 Note that you still can use standard Laravel migrations. Also, migrations can be placed into subdirectories.

Seeders
=======

[](#seeders)

The package uses a bit different approach compared with standard and provides a few different types of seeders:

- [`Seeder`](./src/Seeders/Seeder.php) - unlike standard `Seeder` it is safer and will not run seeder if it is already applied (so it is safe for production 🤩);
- [`SqlSeeder`](./src/Seeders/SqlSeeder.php) - extends `SmartSeeder` and allow you to use SQL.

To create SQL Seeder you should use the [command](docs/Commands/sql-seeder.md):

```
php artisan lara-asp-migrator:sql-seeder MySeeder
```

The command will create two files:

- `MySeeder.php` - The class can be used to customize `isSeeded()` method, e.g. you can check if a model exists in the database.
- `MySeeder.sql` - the file where the SQL seed stored.

Upgrading
=========

[](#upgrading)

Please follow [Upgrade Guide](UPGRADE.md).

Contributing
============

[](#contributing)

Please use the [main repository](https://github.com/LastDragon-ru/php-packages) to [report issues](https://github.com/LastDragon-ru/php-packages/issues), send [pull requests](https://github.com/LastDragon-ru/php-packages/pulls), or [ask questions](https://github.com/LastDragon-ru/php-packages/discussions).

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance94

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~23 days

Recently: every ~30 days

Total

85

Last Release

31d ago

Major Versions

7.x-dev → 8.0.02025-04-03

8.1.0 → 9.0.02025-04-08

8.x-dev → 9.1.02025-04-10

9.x-dev → 10.0.02026-01-17

10.3.0 → 11.0.02026-04-17

PHP version history (9 changes)0.1.0PHP &gt;=7.4.0

0.4.0PHP &gt;=8.0.0

0.12.0PHP ^8.0.0

2.0.0PHP ^8.0|^8.1|^8.2

5.0.0-beta.0PHP ^8.1|^8.2

5.0.0PHP ^8.1|^8.2|^8.3

7.0.0PHP ^8.2|^8.3

8.0.0PHP ^8.3|^8.4

11.0.0PHP ^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd8f9191d64064a1102702bb23c04d6d1b995db2ec0b08d1a59ead018a9476d0?d=identicon)[LastDragon](/maintainers/LastDragon)

---

Top Contributors

[![LastDragon-ru](https://avatars.githubusercontent.com/u/1329824?v=4)](https://github.com/LastDragon-ru "LastDragon-ru (454 commits)")

---

Tags

lara-asplaravellaravel-packagemigrationsphplaraveldatabasemysqlsqllaravel-packagedatabase-migrationlaravel-raw-sql-migratorlaravel-migrator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lastdragon-ru-lara-asp-migrator/health.svg)

```
[![Health](https://phpackages.com/badges/lastdragon-ru-lara-asp-migrator/health.svg)](https://phpackages.com/packages/lastdragon-ru-lara-asp-migrator)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M188](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.5k](/packages/illuminate-database)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M626](/packages/spatie-laravel-medialibrary)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.8M142](/packages/laravel-cashier)

PHPackages © 2026

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