PHPackages                             temori/distancexport - 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. temori/distancexport

ActiveLibrary

temori/distancexport
====================

Data migration tool that can migrate data between databases with different structures.

v1.0.0(5y ago)03MITJavaScriptPHP &gt;=5.4CI failing

Since Nov 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/temori1919/distancexport)[ Packagist](https://packagist.org/packages/temori/distancexport)[ RSS](/packages/temori-distancexport/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

distancexport
-------------

[](#distancexport)

[![https://img.shields.io/badge/license-MIT-green.svg](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667) [![Packagist PHP Version Support (custom server)](https://camo.githubusercontent.com/80cbf0b0b874cff04c138d9b4490986c6621bba328f109319651a6fd703f372a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f74656d6f72692f64697374616e636578706f7274)](https://camo.githubusercontent.com/80cbf0b0b874cff04c138d9b4490986c6621bba328f109319651a6fd703f372a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f74656d6f72692f64697374616e636578706f7274) [![Packagist Version](https://camo.githubusercontent.com/6933c5326f41f40c72faec0d5370f4b4b1b9b2831658b55f05badcad7594e4be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74656d6f72692f64697374616e636578706f7274)](https://camo.githubusercontent.com/6933c5326f41f40c72faec0d5370f4b4b1b9b2831658b55f05badcad7594e4be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74656d6f72692f64697374616e636578706f7274) [![GitHub code size in bytes](https://camo.githubusercontent.com/4cc405d8adaf8e4faa35521cbdad2af8ae07a63107946b9503720757697553cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f74656d6f7269313931392f64697374616e636578706f7274)](https://camo.githubusercontent.com/4cc405d8adaf8e4faa35521cbdad2af8ae07a63107946b9503720757697553cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f74656d6f7269313931392f64697374616e636578706f7274)

Data migration tool between databases.

Data migration is possible regardless of RDB.

[![](https://user-images.githubusercontent.com/17793990/97781529-703a9600-1bcf-11eb-8e5d-cf7db08c9da1.png)](https://user-images.githubusercontent.com/17793990/97781529-703a9600-1bcf-11eb-8e5d-cf7db08c9da1.png)

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

[](#table-of-contents)

- [Features](#Features)
- [Installation](#Installation)
- [Requirements](#requirements)
- [Usage](#usage)
- [Supported RDB driver types](#supported-rdb-driver-types)
- [Add RDB driver](#add-rdb-driver)
- [Note](#note)
- [License](#license)

Features
--------

[](#features)

- Database data migration tools.
- Data migration between two databases is possible.
- Migrate the data in the source column in the same row as the destination column in a web like Google Spreadsheet.
- The default only supports Mysql and pgsql drivers.

    If you want to use another driver, you can add a driver classes.

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

[](#requirements)

- php 5.4 or later

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

[](#installation)

Using composer:

```
cd path/to/your/project
composer require temori/distancexport --dev
```

Usage
-----

[](#usage)

- Create a php files.

    If you use any FW, Create a routable controllers.
- Define the following constants.

    - For the destination DB.
        - `DX_DESTINATION_DB_DRIVER` destination DB drivers.
        - `DX_DESTINATION_DB_HOST` destination DB hosts.
        - `DX_DESTINATION_DB_PORT` destination DB ports.
        - `DX_DESTINATION_DB_USERNAME` destination DB accounts.
        - `DX_DESTINATION_DB_PASSWORD` destination DB passwords.
    - For the source DB.
        - `DX_SOURCE_DB_DRIVER` source DB drivers.
        - `DX_SOURCE_DB_HOST` source DB hosts.
        - `DX_SOURCE_DB_PORT` source DB ports.
        - `DX_SOURCE_DB_USERNAME` source DB accounts.
        - `DX_SOURCE_DB_PASSWORD` source DB passwords.
    - When need csrf tokens.
        - `DX_CSRF_TOKEN_NAME` CSRF token name fields.
        - `DX_CSRF_TOKEN` CSRF token fields.
- Create an instance of `\Temori\Distancexport\Distancexport` with the created php file or controller and execute the `init()` method,

    like below.

    ```
    $dis = new \Temori\Distancexport\Distancexport();
    $dis->init();
    ```
- If you use a FW that requires routing settings, you need to create the routes `get` and` post`.
- Open the above php file or controller url.
- Since table names, data types, key types, etc. are lined up like a spreadsheet, copy and paste the column name you want to migrate next to the migration destination database column.

    The columns required for migration are `Field` in` Destination Databases` and `Field` in` Source Databases`.

    Data migration is ignored if `Field` in` Source Databases` is blank.

    If you enter a character string in the `Uniformity` column as an option, the character string described in `Uniformity` will be added to all records.
- The `Dry run` button performs test execution, and the` Run` button executes data migration.

    If an exception occurs, an error message will be displayed in `Results` and` message`.

Supported RDB driver types
--------------------------

[](#supported-rdb-driver-types)

- Mysql
- postgresql

Add RDB driver
--------------

[](#add-rdb-driver)

If you want you can add other driver classes.

For the class to be created, implement the `BaseDriver` class and inherit the `Connect` class.

In addition, create a method that produces the same execution result as the following class.

> [DataBases/Drivers/Mysql.php](https://github.com/temori1919/distancexport/blob/master/src/DataBases/Drivers/Mysql.php)

Specify the driver class added when creating the instance as shown below.

```
$dis = new \Temori\Distancexport\Distancexport(\Some\NameSpace\DestinationDriverClass::class, \Some\NameSpace\SourceDriverClass::class);
```

Note
----

[](#note)

**\[warning\]**

Since the entire database structure is displayed, please be careful about security when using it.

License
-------

[](#license)

Paddington is licensed under the [MIT](https://opensource.org/licenses/mit-license.php) license.
Copyright © 2020, Atushi Inoue

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

2012d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17793990?v=4)[temori1919](/maintainers/temori1919)[@temori1919](https://github.com/temori1919)

---

Top Contributors

[![temori1919](https://avatars.githubusercontent.com/u/17793990?v=4)](https://github.com/temori1919 "temori1919 (11 commits)")

### Embed Badge

![Health badge](/badges/temori-distancexport/health.svg)

```
[![Health](https://phpackages.com/badges/temori-distancexport/health.svg)](https://phpackages.com/packages/temori-distancexport)
```

###  Alternatives

[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M54](/packages/timacdonald-log-fake)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M32](/packages/jasonmccreary-laravel-test-assertions)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M774](/packages/typo3-testing-framework)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

76460.0k15](/packages/robiningelbrecht-phpunit-pretty-print)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

31252.7k5](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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