PHPackages                             orkhanahmadov/content-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. orkhanahmadov/content-migrations

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

orkhanahmadov/content-migrations
================================

Content migrations package for Laravel

1.1.1(5y ago)541MITPHPPHP ^7.2

Since Sep 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/orkhanahmadov/content-migrations)[ Packagist](https://packagist.org/packages/orkhanahmadov/content-migrations)[ Docs](https://github.com/orkhanahmadov/content-migrations)[ GitHub Sponsors](https://github.com/orkhanahmadov)[ RSS](/packages/orkhanahmadov-content-migrations/feed)WikiDiscussions master Synced yesterday

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

Laravel Content Migrations
==========================

[](#laravel-content-migrations)

[![Latest Stable Version](https://camo.githubusercontent.com/84639c8454ae1b3f7c7faeafcff10d77c05e477b264bc8b4bedbb5606cb002c3/68747470733a2f2f706f7365722e707567782e6f72672f6f726b68616e61686d61646f762f636f6e74656e742d6d6967726174696f6e732f762f737461626c65)](https://packagist.org/packages/orkhanahmadov/content-migrations)[![Latest Unstable Version](https://camo.githubusercontent.com/6bdf8ef6d273c5b5024fe2455e471636e37828360702022d690468427ef03ad3/68747470733a2f2f706f7365722e707567782e6f72672f6f726b68616e61686d61646f762f636f6e74656e742d6d6967726174696f6e732f762f756e737461626c65)](https://packagist.org/packages/orkhanahmadov/content-migrations)[![Total Downloads](https://camo.githubusercontent.com/bdb1a4230ef9bb386e581388778b8eaddb15c1efc41010a01a9849d40bbe8b9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f726b68616e61686d61646f762f636f6e74656e742d6d6967726174696f6e73)](https://packagist.org/packages/orkhanahmadov/content-migrations)[![License](https://camo.githubusercontent.com/89dbc7069d095fd14ff81b471dd0b1cb709a2e3e3bdaaf8551d2719e036469c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f726b68616e61686d61646f762f636f6e74656e742d6d6967726174696f6e732e737667)](https://github.com/orkhanahmadov/content-migrations/blob/master/LICENSE.md)

[![Build Status](https://camo.githubusercontent.com/a7ba04f531cf7c824c4a305cca8f55be710f656a8d5bda3b52fb2d5fa9d29a59/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6f726b68616e61686d61646f762f636f6e74656e742d6d6967726174696f6e732e737667)](https://travis-ci.org/orkhanahmadov/content-migrations)[![Test Coverage](https://camo.githubusercontent.com/e6c28ba41ef831474e68c9807f1c8b1ad6663b7ff6d0ff00274d5a4beabc493a/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35313533633565396336626136663664666630302f746573745f636f766572616765)](https://codeclimate.com/github/orkhanahmadov/content-migrations/test_coverage)[![Maintainability](https://camo.githubusercontent.com/fe9e1abde1da094900fa89e8c0b77cee568426c6356e15277834af58692a9179/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35313533633565396336626136663664666630302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/orkhanahmadov/content-migrations/maintainability)[![Quality Score](https://camo.githubusercontent.com/d740d1d32319f76f3ab9bf6485803697445406abc152bbe46753c3da79d4994b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f726b68616e61686d61646f762f636f6e74656e742d6d6967726174696f6e732e737667)](https://scrutinizer-ci.com/g/orkhanahmadov/content-migrations)[![StyleCI](https://camo.githubusercontent.com/58dcff00d6f0de006b59b42d49f43c7e8ec3eb34320c1ae8e67f823124ccfb1d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3239373236333035312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/297263051?branch=master)

Package simplifies having content-based migrations separate from Laravel's migrations.

Why?
----

[](#why)

Sometimes using migrations to manage content in database tables comes very handy to automate the content update process on all environments. Like adding new translations or updating products.

But using Laravel's own migrations for this purpose have some drawback:

- Laravel's migrations are not meant for content management, it is meant for database structure changes only.
- After some time it gets hard to manage and find content-based migrations among many migration files.
- Recent introduction of "migration squashing" in Laravel 8 copies only last state of database structure. This means if you have content-based migrations you need to find a way to migrate them again if you have an empty database.

Laravel seeders are ideal for managing content in your database, but they also have their drawbacks:

- They are not as automatic as migrations, you need to run and track each of them individually
- If you have an empty datatabase it becomes hard, almost impossible to know the order of seeders to run

This package aims to solve these problems by having dedicated content-based migrations separate from usual Laravel migrations.

Requirements
------------

[](#requirements)

- PHP **7.2** or above
- Laravel **6** or above

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

[](#installation)

You can install the package via composer:

```
composer require orkhanahmadov/content-migrations
```

Usage
-----

[](#usage)

To create content-based migration run `make:content-migration` artisan command and pass migration name:

```
php artisan make:content-migration add_new_translations
```

This will command will generate timestamp-based content migration inside `database/content-migrations` folder of your application.

Generated migration will have single `up()` method, you can use this method to insert/update/delete content in your database.

To migrate your content-based migrations, run:

```
php artisan content-migrate
```

This will behave the same way as Laravel's own `php artisan migrate` command, but this command will track processed migrations in `content_migrations` table, separate from Laravel's `migrations` table.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Orkhan Ahmadov](https://github.com/orkhanahmadov)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~2 days

Total

6

Last Release

2045d ago

### Community

Maintainers

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

---

Top Contributors

[![orkhanahmadov](https://avatars.githubusercontent.com/u/7041590?v=4)](https://github.com/orkhanahmadov "orkhanahmadov (32 commits)")[![amikishiyev](https://avatars.githubusercontent.com/u/964740?v=4)](https://github.com/amikishiyev "amikishiyev (2 commits)")

---

Tags

laravelmigrationscontent-migrations

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/orkhanahmadov-content-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/orkhanahmadov-content-migrations/health.svg)](https://phpackages.com/packages/orkhanahmadov-content-migrations)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

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

Eloquent model validating trait.

9723.3M47](/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)[outerweb/settings

Application wide settings stored in your database

4899.2k5](/packages/outerweb-settings)

PHPackages © 2026

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