Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zyimm/sync-data-struct

sync-data-struct是一个用来比较两个数据库之间的数据结构差异,并生成更新DDL的工具包.方便对比出两个数据库之间差异来进行数据结构同步.
https://github.com/zyimm/sync-data-struct

mysql mysql-database

Last synced: about 1 month ago
JSON representation

sync-data-struct是一个用来比较两个数据库之间的数据结构差异,并生成更新DDL的工具包.方便对比出两个数据库之间差异来进行数据结构同步.

Awesome Lists containing this project

README

        

## sync-data-struct
sync-data-struct是一个用来比较两个数据库之间的数据结构差异,并生成更新DDL的工具包,不依赖于任何三方库.方便对比出两个数据库之间差异来进行数据结构同步.|
sync-data-struct is a toolkit for comparing data structure differences between two databases and generating updated DDL. Easy to compare the difference between the two databases for data structure synchronization

## support database && 支持的数据库
- mysql

## install && 安装
```
composer require zyimm/sync-data-struct
```
## example && 示例
```
//set error
error_reporting(E_ALL);
ini_set('display_errors', true);
//autoload
include '../vendor/autoload.php';
//db
$config = [
//本地数据库
'local' => [
'host' => 'mysql',
'username' => 'root',
'passwd' => '123456',
'dbname' => 'local'
],
//开发数据库或目标同步数据
'dev' => [
'host' => 'mysql',
'username' => 'root',
'passwd' => '123456',
'dbname' => 'dev'
]
];
$handle = new \Zyimm\dbStructSync\Sync($config);
echo $handle->toHtml();
```

## issue
能力有限!欢迎提出issue,共同学习进步。