PHPackages                             norgul/laravel-data-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. norgul/laravel-data-migrations

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

norgul/laravel-data-migrations
==============================

Laravel support for data migrations

v1.0.0(3y ago)05MITPHPPHP ^7.4||^8.0

Since Nov 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Norgul/laravel-data-migrations)[ Packagist](https://packagist.org/packages/norgul/laravel-data-migrations)[ RSS](/packages/norgul-laravel-data-migrations/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Laravel Data Migrations
=======================

[](#laravel-data-migrations)

This package is used to deliver seamless data migrations to Laravel. Data migrations are version control system for your mandatory DB data (like statuses, types, etc.) without which the app wouldn't function.

One alternative is to burn these within your plain migrations, other is just to use seeders at which point you need to devise a mechanism to split production grade seeders from the development ones.

These are all good solutions as long as you follow some methodology and are consistent. The goal of this package was to deliver a real separation for this use case.

Installation
============

[](#installation)

Require the package with `composer require norgul/laravel-data-migrations`. Service provider will be registered automatically.

Usage
=====

[](#usage)

You can start using the package by running commands below which are following Laravel `migration` command structure with, for the most part, the same API they provide.

Remember you can add `-h` flag to show all available options for a particular command.

Commands
========

[](#commands)

Make Data Migration
-------------------

[](#make-data-migration)

`php artisan make:data-migration {name}`

Create your first data migration. This will create `data-migrations` directory in your `database`directory if it doesn't already exist, which is the place where you'll find already familiar naming structure.

Package is using Laravel migrator in the background, so if you run:

```
php artisan make:data-migration add_user_types_to_users_table

```

The table guesser will automatically add a data migration with `users` table stubbed in.

Even though you can reference Eloquent classes and even your seeders from within data migrations, it is **highly recommended** to use `DB` facade to execute queries. Reason behind it is that your classes and seeders may change over time, thus leaving your data migrations execute differently in the future. Always using `DB`facade will ensure that end results are always the same.

Data Migrate
------------

[](#data-migrate)

`php artisan data-migrate`

Execute your migrations with `data-migrate` command. These will be executed once, in the same way as standard migrations are ran (by executing `up()` function).

Command will automatically create `data_migrations` table in the DB if it doesn't already exist.

Data Migrate Rollback
---------------------

[](#data-migrate-rollback)

`php artisan data-migrate:rollback`

You can revert your changes by executing this command which will trigger `down()` function in the data migration.

Data Migrate Install
--------------------

[](#data-migrate-install)

`php artisan data-migrate:install`

You never need to run this command explicitly. It is here for documentation purposes.

This command will create `data_migrations` table in your DB.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1274d ago

### Community

Maintainers

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

---

Top Contributors

[![Norgul](https://avatars.githubusercontent.com/u/11718157?v=4)](https://github.com/Norgul "Norgul (8 commits)")

---

Tags

phplaraveldatadatabasemigrations

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/norgul-laravel-data-migrations/health.svg)

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

###  Alternatives

[nwidart/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

37839.1k](/packages/nwidart-db-exporter)[umbrellio/laravel-pg-extensions

Extensions for Postgres Laravel

102426.5k1](/packages/umbrellio-laravel-pg-extensions)[elimuswift/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

364.7k](/packages/elimuswift-db-exporter)[wayofdev/laravel-cycle-orm-adapter

🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)[codewithkyrian/chromadb-laravel

ChromaDB Laravel is a Laravel client for the Chroma Open Source Embedding Database

144.1k](/packages/codewithkyrian-chromadb-laravel)

PHPackages © 2026

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