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.

10.3.0(2mo ago)07.9kMITPHPPHP ^8.3|^8.4

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 1mo ago

READMEChangelogDependencies (36)Versions (84)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``^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`^12.0.1``HEAD ⋯ 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

55

—

FairBetter than 98% of packages

Maintenance89

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 ~53 days

Total

83

Last Release

64d ago

Major Versions

6.4.2 → 7.0.02024-11-17

7.2.0 → 8.0.02025-04-03

8.1.0 → 9.0.02025-04-08

8.x-dev → 9.1.02025-04-10

9.3.1 → 10.0.02026-01-17

PHP version history (8 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

### 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 (448 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

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[illuminate/database

The Illuminate Database package.

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

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[laravel/pennant

A simple, lightweight library for managing feature flags.

57311.1M53](/packages/laravel-pennant)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)

PHPackages © 2026

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