PHPackages                             testmonitor/laravel-nested-migrations - 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. testmonitor/laravel-nested-migrations

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

testmonitor/laravel-nested-migrations
=====================================

Organize Laravel migration files into subfolders

2.0.0(5y ago)16.6k1[2 PRs](https://github.com/testmonitor/laravel-nested-migrations/pulls)MITPHPPHP ^7.4|^8.0

Since Nov 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/testmonitor/laravel-nested-migrations)[ Packagist](https://packagist.org/packages/testmonitor/laravel-nested-migrations)[ RSS](/packages/testmonitor-laravel-nested-migrations/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (6)Versions (5)Used By (0)

Laravel Nested Migrations
=========================

[](#laravel-nested-migrations)

[![Latest Stable Version](https://camo.githubusercontent.com/f6dafbfe99a6b26aec401035081c8df2482adb3570621ccef00b1b133ce481ab/68747470733a2f2f706f7365722e707567782e6f72672f746573746d6f6e69746f722f6c61726176656c2d6e65737465642d6d6967726174696f6e732f762f737461626c65)](https://packagist.org/packages/testmonitor/laravel-nested-migrations)[![CircleCI](https://camo.githubusercontent.com/35ce857749af91f3025845d5afc25198078b89aebf84d7b7e8e3fd72ea90d4b7/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f746573746d6f6e69746f722f6c61726176656c2d6e65737465642d6d6967726174696f6e732e737667)](https://circleci.com/gh/testmonitor/laravel-nested-migrations)[![Travis Build](https://camo.githubusercontent.com/c749ca60344dfbb4de74f93d4c80fedf50f0a47c6fd07662b6cd1034ac2db4d2/68747470733a2f2f7472617669732d63692e636f6d2f746573746d6f6e69746f722f6c61726176656c2d6e65737465642d6d6967726174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/testmonitor/laravel-nested-migrations)[![Code Quality](https://camo.githubusercontent.com/17771fe1d93d09bfb6d5a57001fed0cb9e8feac26419d832f8a69fba5538dce8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746573746d6f6e69746f722f6c61726176656c2d6e65737465642d6d6967726174696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/testmonitor/laravel-nested-migrations/?branch=master)[![StyleCI](https://camo.githubusercontent.com/217acfecac23a9199343c504cc85546cab8bd566cdd802c6779325506a85ebe6/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232323237363130312f736869656c64)](https://styleci.io/repos/222276101)[![License](https://camo.githubusercontent.com/62ae652ce26b36101dbad63b395a885d7a568eff187c106a44ba22253bddd2f3/68747470733a2f2f706f7365722e707567782e6f72672f746573746d6f6e69746f722f6c61726176656c2d6e65737465642d6d6967726174696f6e732f6c6963656e7365)](https://packagist.org/packages/testmonitor/laravel-nested-migrations)

With Nested Migrations, you can organize your migration files into subfolders, keeping things a bit cleaner.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Tests](#tests)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

This package can be installed through Composer:

```
$ composer require testmonitor/laravel-nested-migrations
```

The package will automatically register itself.

Usage
-----

[](#usage)

Once loaded, you can start organizing your migration files into folders. You might want to take a look at the [examples](#examples) section to get a better picture.

Please note that nesting is limited to **one level deep**. This avoids any recursive mess.

Examples
--------

[](#examples)

Imagine a migration file layout like this:

```
 database/migrations/
    - 2018_09_01_180000_create_projects_table.php
    - 2018_11_11_180000_create_users_table.php
    - 2019_01_20_180000_create_settings_table.php
    - 2019_11_12_180000_create_teams_table.php

```

Nothing out of the ordinary, right? But what if this list gets bigger? Like a 100 migration files? Things tend to get difficult at that stage. Usually, you'd want to categorize these files into folders and that's exactly where this package comes in.

Now, you can do this:

```
 database/migrations/1.0
    - 2018_09_01_180000_create_projects_table.php
    - 2018_11_11_180000_create_users_table.php

 database/migrations/1.1
    - 2019_01_20_180000_create_settings_table.php

 database/migrations/2.0
    - 2019_11_12_180000_create_teams_table.php

```

A version-based migration folder layout is a great way to handle bigger apps, but you can use any name or number you'd like. Just keep in mind that the folders are sorted alphanumerically and migration files are ran through accordingly.

Tests
-----

[](#tests)

The package contains integration tests. You can run them using PHPUnit.

```
$ vendor/bin/phpunit

```

Changelog
---------

[](#changelog)

Refer to [CHANGELOG](CHANGELOG.md) for more information.

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

[](#contributing)

Refer to [CONTRIBUTING](CONTRIBUTING.md) for contributing details.

Credits
-------

[](#credits)

- [Thijs Kok](https://www.testmonitor.com/)
- [Stephan Grootveld](https://www.testmonitor.com/)
- [Frank Keulen](https://www.testmonitor.com/)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Refer to the [License](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

1968d ago

Major Versions

1.1.0 → 2.0.02020-12-17

PHP version history (2 changes)1.0.0PHP ^7.2

2.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/47f66133b6b4806a16aaed043daa733f5e97adb7a10c9982d01a1cda9f492040?d=identicon)[stefanius](/maintainers/stefanius)

![](https://www.gravatar.com/avatar/39f48c881813b7d3b044ca5660aa5ab9e60b5dd7c34ed4a47acbb11bd20b7593?d=identicon)[thijskok](/maintainers/thijskok)

---

Top Contributors

[![thijskok](https://avatars.githubusercontent.com/u/1344550?v=4)](https://github.com/thijskok "thijskok (18 commits)")

---

Tags

migrationnestedpathfolderrecursivetestmonitor

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/testmonitor-laravel-nested-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/testmonitor-laravel-nested-migrations/health.svg)](https://phpackages.com/packages/testmonitor-laravel-nested-migrations)
```

###  Alternatives

[watson/validating

Eloquent model validating trait.

9723.3M46](/packages/watson-validating)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

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

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[dragon-code/migrate-db

Easy data transfer from one database to another

15717.4k](/packages/dragon-code-migrate-db)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

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

PHPackages © 2026

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