PHPackages                             discorgento/module-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. discorgento/module-migrations

ActiveMagento2-module[Database &amp; ORM](/categories/database)

discorgento/module-migrations
=============================

A dev-friendly approach to quickly create migrations (patch data) on Magento 2

2.9.0(2mo ago)2414.7k↓20.5%4MITPHPPHP &gt;=7.3.0 &lt;8.5

Since Aug 7Pushed 2mo ago2 watchersCompare

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

READMEChangelogDependenciesVersions (24)Used By (0)

[![Discorgento Migrations](docs/header.png)](docs/header.png)

A dev-friendly approach to keep track of database changes in Magento 2

 [![GitHub Stars](https://camo.githubusercontent.com/01af90f14e023f9c49d2ca5b1a385bcee063eb6a8d98f490645d6f26f88d7b02/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f646973636f7267656e746f2f6d6f64756c652d6d6967726174696f6e733f7374796c653d736f6369616c)](https://github.com/discorgento/module-migrations/stargazers) [![Total Downloads](https://camo.githubusercontent.com/9adf5b68ce703590b245942bdb24fcdd9768e1e49e3888ad6f6fc9a7c38f032d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646973636f7267656e746f2f6d6f64756c652d6d6967726174696f6e73)](https://packagist.org/packages/discorgento/module-migrations/stats) [![Latest Version on Packagist](https://camo.githubusercontent.com/26c40d7eaf1a4d2d0a7245826e4bc58a43ca6c13e0f995cc8ce328ad783fd0e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646973636f7267656e746f2f6d6f64756c652d6d6967726174696f6e73)](https://packagist.org/packages/discorgento/module-migrations) [![Join our Discord](https://camo.githubusercontent.com/c448784fc6c083dd1207f1fa1f0b89cf402e27bdb1a717cf558d4f56c3da4ecf/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3736383635333234383930323333323432383f636f6c6f723d253233373238396439266c6162656c3d446973636f7264)](https://discorgento.com/discord)

Our Sponsors

 [![Caravel X](docs/sponsors/caravelx.svg)](https://www.caravel.com.br/)

Overview 💭
----------

[](#overview-)

Just changed something on the admin panel or on the database and now you need to replicate it again in staging and production? No worries, [we](https://discorgento.com/discord) got you covered.

Probably you already heard about [data patches](https://developer.adobe.com/commerce/php/development/components/declarative-schema/patches/), but what if I say that it can be really, really simplified?

[![image](docs/tldr.png)](docs/tldr.png)From 50 lines to just 15, or simply 70% less code. SEVENTY percent fewer lines. But we're just getting started.

Install 🔧
---------

[](#install-)

This module is compatible with both Magento 2.3 and 2.4, from PHP 7.3 to 8.3.

```
composer require discorgento/module-migrations:^2 && bin/magento setup:upgrade

```

Usage 🥤
-------

[](#usage-)

Quick demo on how to use it:
[![](https://user-images.githubusercontent.com/4603111/202745678-d9960d66-4618-4100-aee1-50a4cc728829.png)](https://odysee.com/@discorgento:8/Introduction-to-Module-Migrations-Magento-discorgento-module-migrations:a)

> There's also an extended version in Brazillian Portuguese including CMS content management overview available [here](https://odysee.com/@discorgento:8/Introdu%C3%A7%C3%A3o-ao-Modulo-Migrations-Magento-discorgento-module-migrations:9).

Besides simplifying the basic structure like showed before, we also provide some [facades](https://refactoring.guru/design-patterns/facade) to common tasks like handling [admin config](https://github.com/discorgento/module-migrations/wiki/Admin-Config), [product attributes](https://github.com/discorgento/module-migrations/wiki/Product-Attributes), [cms content](https://github.com/discorgento/module-migrations/wiki/Cms-Content) and [more](https://github.com/discorgento/module-migrations/wiki). As an example, you can use a snippet like this to create a whole new CMS Page, including Page Builder widgets on its content:

```
