temori/distancexport 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

temori/distancexport

Composer 安装命令:

composer require temori/distancexport

包简介

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

README 文档

README

https://img.shields.io/badge/license-MIT-green.svg Packagist PHP Version Support (custom server) Packagist Version GitHub code size in bytes

Data migration tool between databases.

Data migration is possible regardless of RDB.

Table of Contents

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

  • php 5.4 or later

Installation

Using composer:

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

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

  • Mysql
  • postgresql

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

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

[warning]

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

License

Paddington is licensed under the MIT license.
Copyright © 2020, Atushi Inoue

temori/distancexport 适用场景与选型建议

temori/distancexport 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 10 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 temori/distancexport 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 temori/distancexport 我们能提供哪些服务?
定制开发 / 二次开发

基于 temori/distancexport 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-27