PHPackages                             cleaniquecoders/data-migration - 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. cleaniquecoders/data-migration

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

cleaniquecoders/data-migration
==============================

This package allows data migration from one source to another

1.3.0(1mo ago)25MITPHPPHP ^8.1 | ^8.2 | ^8.3 | ^8.4CI passing

Since Jul 19Pushed 1mo agoCompare

[ Source](https://github.com/cleaniquecoders/data-migration)[ Packagist](https://packagist.org/packages/cleaniquecoders/data-migration)[ Docs](https://github.com/cleaniquecoders/data-migration)[ RSS](/packages/cleaniquecoders-data-migration/feed)WikiDiscussions main Synced 1mo ago

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

Data Migration
==============

[](#data-migration)

[![Latest Version on Packagist](https://camo.githubusercontent.com/799ec3069032eb057b797380fdf09d63906c1d4a7b3ac03b10ad2da96e3a5dcb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c65616e69717565636f646572732f646174612d6d6967726174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/data-migration)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5a673dd627c3a75c55f1fc352c8f63a202b87b358e3200e9a8e9c2bc5fcbb2a5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636c65616e69717565636f646572732f646174612d6d6967726174696f6e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/cleaniquecoders/data-migration/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d4ad38b134cb408867d2b48aba93698caf150e6952dd966b159d8d7bbfc3e2f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636c65616e69717565636f646572732f646174612d6d6967726174696f6e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/cleaniquecoders/data-migration/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/235263429f30dd87205922710d932b1d50f49fc03895522f2018f248d84eeb48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c65616e69717565636f646572732f646174612d6d6967726174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/data-migration)

This package allows data migration from one source to another.

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

[](#installation)

> At the moment, we only provide table-to-table migration. We are not yet implementing column mapping, or data transformation at this point in time.

You can install the package via composer:

```
composer require cleaniquecoders/data-migration
```

You can publish the config file with:

```
php artisan vendor:publish --tag="data-migration-config"
```

Configure the connections to the database that you need to migrate from (the source) and it's destination in the `config/data-migration.php` in `connections` key.

Once that completed, update the `tables` configuration in `config/data-migration.php`. This is the mapping of the data migration from source table to destination table.

```
'tables' => [
    '_source_table' => 'destination_table',
    'media' => 'app_media',
]
```

You can set to run the Laravel migration by following setting. By default this option is disabled.

```
DATA_MIGRATION_RUN=true

```

You may want to enable Foreign Key check as well. By default this option is disabled.

```
DATA_MIGRATION_FK_CHECK=false

```

You also can truncate the destination table before migrating the data. By default this option is enabled.

```
DATA_MIGRATE_TRUNCATE=true

```

Usage
-----

[](#usage)

> Before you run this command, please make sure you are firmed with the configuration and run the data migration in non-production environment.

To start migrate, run the following command:

```
php artisan data:migrate mysql pgsql
```

By default, the migration will query by chunk of 100. If you need to increase the numbers, you can provide the option:

```
php artisan data:migrate mysql pgsql --chunk=1000
```

> By increasing the chunk, it might impact the performance of the migration.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Nasrul Hazim Bin Mohamad](https://github.com/cleaniquecoders)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance92

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~246 days

Total

5

Last Release

40d ago

PHP version history (3 changes)1.0.0PHP ^8.1

1.1.0PHP ^8.1 | ^8.2 | ^8.3

1.2.0PHP ^8.1 | ^8.2 | ^8.3 | ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b57069d0f4b634f65eccc6e5d5848990e25968d45ec2cf46d626c6a4658f944b?d=identicon)[nasrulhazim.m](/maintainers/nasrulhazim.m)

---

Top Contributors

[![nasrulhazim](https://avatars.githubusercontent.com/u/10341422?v=4)](https://github.com/nasrulhazim "nasrulhazim (26 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelcleaniquecodersdata migration

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cleaniquecoders-data-migration/health.svg)

```
[![Health](https://phpackages.com/badges/cleaniquecoders-data-migration/health.svg)](https://phpackages.com/packages/cleaniquecoders-data-migration)
```

###  Alternatives

[dyrynda/laravel-model-uuid

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

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spatie/laravel-model-flags

Add flags to Eloquent models

4301.1M1](/packages/spatie-laravel-model-flags)[clickbar/laravel-magellan

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

423715.4k1](/packages/clickbar-laravel-magellan)[spatie/laravel-sql-commenter

Add comments to SQL queries made by Laravel

1931.4M1](/packages/spatie-laravel-sql-commenter)[spatie/laravel-deleted-models

Automatically copy deleted records to a separate table

409109.8k4](/packages/spatie-laravel-deleted-models)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

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